Linker plugins should be aware of --defsym during symbol resolution
Sriraman Tallam via binutils
binutils@sourceware.org
Wed Feb 14 00:08:00 GMT 2018
More information about the Binutils mailing list
Wed Feb 14 00:08:00 GMT 2018
- Previous message (by thread): Linker plugins should be aware of --defsym during symbol resolution
- Next message (by thread): Linker plugins should be aware of --defsym during symbol resolution
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Feb 13, 2018 at 3:53 PM, Cary Coutant <ccoutant@gmail.com> wrote: >> This is a nice idea and I am able to make this work for defsym uses. >> Anything I could do for definitions too? I could add a defined_ field >> in Symbol which is set to Defined::DEFSYM. That would avoid >> is_defsym_def too. > > I'd think Symbol::source() = Symbol::IS_CONSTANT would be the test you > need. That would also catch symbols defined in scripts, too. I was looking at this. This doesn't work when bar is declared in foo.cc and then defined using defsym. For example: extern "C" { int foo() { return 27; } extern int bar(); int main() { return bar(); } } $ gcc -Wl,--defsym,bar=foo -Wl,--plugin,gold/testsuite/plugin_test.so foo.o.syms bar is FROM_OBJECT. > > -cary
- Previous message (by thread): Linker plugins should be aware of --defsym during symbol resolution
- Next message (by thread): Linker plugins should be aware of --defsym during symbol resolution
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list