[PATCH] Linker fix for data-only sections
Nick Clifton
nickc@redhat.com
Wed Feb 10 08:51:00 GMT 2010
Hi Daniel,
>>>> I may be missing something here, but where in your patch do you check
>>>> to make sure that the section is a data section and not a code
>>>> section ?
>>> ARM sections may contain both code and data, ruled by the mapping
>>> symbols, so (according to the EABI) we don't care if the section
>>> happens to have the executable attribute.
>>
>> Doh - I had forgotten that. Of course this only applies to EABI
>> conformant ARM binaries. So maybe you ought to check for non-eabi
>> targets and handle them appropriately ?
>
> Could you please ellaborate? AFAIK, this is ARM (not only EABI), please
> let me know.
What I meant was that the EABI specifies that a section without mapping
symbols should be treated as if it contained data, regardless of any
attributes that might apply to that section. (I think that this is
correct, I do not actually have the text of the EABI in front of me).
But for arm-elf binaries, or arm-wince, or arm-pe, the EABI is not being
used and in these cases it would make intuitive sense that sections
without mapping symbols but with a contains-executable-code attribute of
some kind should be treated as if they contained code.
Does this make sense ?
Cheers
Nick
More information about the Binutils
mailing list