binutils 2.14a 32-bit ARM PE/COFF as section flags

Paul Edwards mutazilah@gmail.com
Tue May 21 05:36:35 GMT 2024


On Mon, 20 May 2024 at 23:20, Nick Clifton <nickc@redhat.com> wrote:
>
> Hi Paul,
>
> > I'm not sure if this is a bug or something I did wrong
> > in my manual configuration or other mods, and I know
> > that binutils 2.14a is long out of support,
>
> Wow - OK, 2.14 is very very old.

Hi Nick.

On the subject of "very old" - your reply is 2 months old - I had
long forgotten the details and environment and moved on. But
with the assistance of the person I was working with, I have
managed to recreate the test case you asked for.

> > "as" doesn't seem to set the section flags properly
> > on object code properly, e.g. DATA is not being marked
> > as DATA, possibly because it is not, or may not be,
> > exclusively data, from the assembler's perpective.
>
> Do you have a test case that demonstrates this ?
>
> I would like to think that this is a fixed bug, but it
> would be good to be able to check and make sure.

If you look at out.txt in the attached nick.zip you will see:

Wrong are the lines 58 and 60. .text should have section flags
"CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE", not just "CONTENTS,
RELOC", and .data should have flags "CONTENTS, ALLOC, LOAD, RELOC,
DATA", not just "CONTENTS, RELOC".


Commands used are in doit.txt

Change as-pdos to whatever your ARM32 COFF/PE is called. Ditto objdump.

Actually, in case attachments don't get through, I have uploaded
http://pdos.org/nick.zip

and I will do the attachment in a separate message.

BFN. Paul.


More information about the Binutils mailing list