bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/18741] Corrupted .ARM.attributes section with -meabi=gnu option


From: markus.eisenmann at gmx dot at
Subject: [Bug gas/18741] Corrupted .ARM.attributes section with -meabi=gnu option
Date: Fri, 31 Jul 2015 08:24:43 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18741

--- Comment #1 from markus.eisenmann at gmx dot at ---
Debugging of BDF- and GAS-sources has shown following behavior:

With calling AS-option meabi=gnu there are now (ARM-) attributes;
I.e. size = 0 in function vendor_obj_attr_size() [bfd/elf-attrs.c] before
return,
but in case of vendor == OBJ_ATTR_PROC a value of '10 + strlen(vendor_name)'
is always added.

Afterwards in GAS - function create_obj_attrs_section() [gas/write.c] - size is
therefore greater 0 and the section ".ARM.attributes" will be emitted.
In this case without any attributes (after the vendor-name) and results in
corrupted content.

Sorry, I'm not familiar with the BDF-internals and requirements, but IMHO:
 a) adding of '10 + strlen(vendor_name)' in vendor_obj_attr_size() causes this
issue,
 b) or in create_obj_attrs_section() (of GAS) should be aborted if 'size -
strlen(name) - 10' is 0 (like indicator, that there are no applied attributes)
as counterpart.

May be this findings above can help to find a suitable fix;
Anyway, I'm looking forward for a answer of an experienced binutils-developer
...

BR,
Markus

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]