bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/17212] Tag_CPU_name merging produces wrong tag.


From: Maxim Ostapenko
Subject: [Bug ld/17212] Tag_CPU_name merging produces wrong tag.
Date: Mon, 01 Sep 2014 14:57:07 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

Hi,

I tried to compile a binary optimized for ARM Cortex-A15 with ARM Cortex-A8 cross-toolchain (host is x86_64-pc-linux-gnu), but Tag_CPU_name appears to be "Cortex-A8" for the binary instead of "Cortex-A15". The example session follows:

$ arm-v7a8-linux-gnueabi-gcc -O2 -mcpu=cortex-a15 divtest.c -o divtest.a15

$ readelf -A divtest.a15

Attribute Section: aeabi
File Attributes
Tag_CPU_name: "Cortex-A8"
Tag_CPU_arch: v7
................................................
Tag_DIV_use: Allowed in v7-A with integer division extension

After some investigation I found out, that Tag_CPU_name merging based on Tag_CPU_arch. Since the first file to appear during linking is crt1.o, which has Tag_CPU_name: "Cortex-A8" for A8 toolchain, the result binary's Tag_CPU_name is also "Cortex-A8". Is this expected behavior of ld, or maybe tags should be merged to a more specific "Cortex-A15"? Perhaps we should use Tag_DIV_use when merging names?

-Maxim



reply via email to

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