[PATCH] Linker fix for data-only sections
Nick Clifton
nickc@redhat.com
Thu Feb 4 09:33: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 ?
> I originally checked for the BFD section data flags, but the 'data-only'
> flag is not useful here.
But there is a SEC_CODE flag which is present in code sections and
absent in data sections.
Cheers
Nick
More information about the Binutils
mailing list