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: Strange KEEP behavior in linker script




Nick Clifton wrote:
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.
i agree with you. This is the mainly the case in our implementation.

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 ?

Reading at old mails it seems indeed that there have been some issues with alignment of empty output sections not discarded. I can see the issue.
If the creation of an empty section is a problem, then the best thing to do with the symbols is indeed to attach them somewhere.


Thanks for you answers,


Cheers
  Nick



-- Denis Ferranti


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