http://sourceware.org/bugzilla/show_bug.cgi?id=14330
--- Comment #6 from Cary Coutant <ccoutant at google dot com> 2012-07-09 16:40:12 UTC --- > This is a wild guess, but I think your asm code is getting placed in a > random section depending on the other options. Try adding a ".text" > statement in the function definition below: To expand a bit on this, the "relocation refers to discarded section" error typically indicates that we discarded a COMDAT section that defined a symbol x, where the kept COMDAT section did not define x. Any references to x from outside the COMDAT group will then produce this error. If the definition for getHostCallReturnValue immediately follows a function that is defined in a normal .text section, everything will work fine. If you change your -D options such that it follows a different function that happens to be defined in a COMDAT section (e.g., an out-of-line inline produced because you're compiling with -g), your function will then get added to that same COMDAT section, and you will see a failure whenever the linker discards that section in favor of an earlier instance of the same COMDAT group. -cary -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils