This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Strange KEEP behavior in linker script
Hi Denis,
just because of the symbols attached to it in the linker script...that
are now attached to another section.
Is the section containing the symbols relevant in this case ?
Presumably what is important is the difference in the values of the two
symbols. ie the size of the contents of the .mysec section. When this
section is empty, the two symbols are attached to another section, but
the difference between them still accurately reflects the size of the
(non-existent) .mysec section.
Essentially I see the situation like this:
The bug with the 2.16 linker's behaviour is that it would create
empty sections in the output.
The bug with the 2.17 linker's behaviour is that it would convert
section-relative symbols to absolute symbols.
The problem with the 2.18 linker's behaviour is that the symbols in
the empty section are being (non-intuitively) attached to another section.
So, where do you think that the symbols should go ?
Cheers
Nick