* [Bug ld/17212] Tag_CPU_name merging produces wrong tag for ARM.
[not found] <54045103.7000606@partner.samsung.com>
@ 2014-09-02 9:19 ` Maxim Ostapenko
2014-09-02 10:45 ` Maxim Ostapenko
0 siblings, 1 reply; 4+ messages in thread
From: Maxim Ostapenko @ 2014-09-02 9:19 UTC (permalink / raw)
To: binutils; +Cc: Yury Gribov, Slava Garbuzov
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Tag_CPU_name merging produces wrong tag for ARM.
2014-09-02 9:19 ` [Bug ld/17212] Tag_CPU_name merging produces wrong tag for ARM Maxim Ostapenko
@ 2014-09-02 10:45 ` Maxim Ostapenko
2014-09-09 6:06 ` [Ping] " Maxim Ostapenko
2014-09-09 9:13 ` Andrew Stubbs
0 siblings, 2 replies; 4+ messages in thread
From: Maxim Ostapenko @ 2014-09-02 10:45 UTC (permalink / raw)
To: binutils, ams, nickc; +Cc: Yury Gribov, Slava Garbuzov
Add Andrew Stubbs and Nick Clifton as author and reviewer of ARM
attributes merging patch (
https://sourceware.org/ml/binutils/2009-01/msg00156.html).
-------- Original Message --------
Subject: [Bug ld/17212] Tag_CPU_name merging produces wrong tag for ARM.
Date: Tue, 02 Sep 2014 13:19:20 +0400
From: Maxim Ostapenko <m.ostapenko@partner.samsung.com>
To: binutils@sourceware.org
CC: Yury Gribov <y.gribov@samsung.com>, Slava Garbuzov
<v.garbuzov@samsung.com>
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ping] Tag_CPU_name merging produces wrong tag for ARM.
2014-09-02 10:45 ` Maxim Ostapenko
@ 2014-09-09 6:06 ` Maxim Ostapenko
2014-09-09 9:13 ` Andrew Stubbs
1 sibling, 0 replies; 4+ messages in thread
From: Maxim Ostapenko @ 2014-09-09 6:06 UTC (permalink / raw)
To: binutils, ams, nickc, rearnsha; +Cc: Yury Gribov, Slava Garbuzov
Ping.
On 09/02/2014 02:45 PM, Maxim Ostapenko wrote:
> Add Andrew Stubbs and Nick Clifton as author and reviewer of ARM
> attributes merging patch
> (https://sourceware.org/ml/binutils/2009-01/msg00156.html).
>
> -------- Original Message --------
> Subject: [Bug ld/17212] Tag_CPU_name merging produces wrong tag
> for ARM.
> Date: Tue, 02 Sep 2014 13:19:20 +0400
> From: Maxim Ostapenko <m.ostapenko@partner.samsung.com>
> To: binutils@sourceware.org
> CC: Yury Gribov <y.gribov@samsung.com>, Slava Garbuzov
> <v.garbuzov@samsung.com>
>
>
>
> 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
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Tag_CPU_name merging produces wrong tag for ARM.
2014-09-02 10:45 ` Maxim Ostapenko
2014-09-09 6:06 ` [Ping] " Maxim Ostapenko
@ 2014-09-09 9:13 ` Andrew Stubbs
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Stubbs @ 2014-09-09 9:13 UTC (permalink / raw)
To: Maxim Ostapenko, binutils, ams, nickc; +Cc: Yury Gribov, Slava Garbuzov
On 02/09/14 11:45, Maxim Ostapenko wrote:
> 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:
I'm not sure what the correct behaviour would be. I did know a lot about
this stuff a few years ago, but my memory has faded, and I'm too busy to
research this much.
I suggest you find the proper document at http://infocentre.arm.com, and
compare the expected behaviour with what actually happens. Then we'll
know how to fix it.
I remember putting in some specific rules for particular tags, but
basically the merging just happens by type, and there's no automatic way
to merge strings.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-09 9:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <54045103.7000606@partner.samsung.com>
2014-09-02 9:19 ` [Bug ld/17212] Tag_CPU_name merging produces wrong tag for ARM Maxim Ostapenko
2014-09-02 10:45 ` Maxim Ostapenko
2014-09-09 6:06 ` [Ping] " Maxim Ostapenko
2014-09-09 9:13 ` Andrew Stubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).