This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gold complains about relocations from note sections to discarded sections


Hi Alan, Hi Cary,

>> What does ld.bfd do?

As Alan mentioned it stops the section from being discarded. :-(

> I'd say ld.bfd --gc-sections is broken.  The .gnu.build.attributes
> relocs cause the otherwise unused section to be kept.

Just FYI - I have now updated the annobin plugin that generates these
notes so that it now puts them into a subsection of .gnu.build.attributes.
It also creates a section group containing the code section and the
attribute section, so that if the linker decides to discard the code, it
will also discard the attributes.  And it works! :-)

So whilst we should still fix the linkers to behave consistently and
correctly, it is not something that is a major priority for me any more.

Cheers
  Nick



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]