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: [PATCH] Linker fix for data-only sections


Hi Nick,

Nick Clifton wrote:
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.



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.

Yes, I also checked for that too, but (IIUC) I don't think it's relevant checking for it due to the same reason.


Daniel.

--
Daniel Gutson
CodeSourcery
www.codesourcery.com


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