Skip to contentSkip to conversation

CONFIG_REMAKE_ELF for aarch64

U-Boot York Sun 2 participants 3 messages Mar 21, 2014 – Apr 2, 2014

lore
Share & tools
lore

York Sun

author
#0 lore raw

Scott,

I am having a problem recreating u-boot.elf for aarch64 targets. The file is OK when Ttext is aligned with 64KB boundary, for example 0x30000000. But if I use 0x30001000 as the text base, the result u-boot.elf has additional offset of 0x10000. For example, the first instruction should be (from objdump)

30001000: 1400000a b 30001028

But it is

30011000: 1400000a b 30011028

My gcc version is

gcc version 4.8.3 20131202 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.12
- Linaro GCC 2013.11)

GNU ld (crosstool-NG linaro-1.13.1-4.8-2013.12 - Linaro GCC 2013.11) 2.24.0.20131220
Supported emulations:
aarch64linux
aarch64elf
aarch64elf32
aarch64elf32b
aarch64elfb
armelf
armelfb
aarch64linuxb
aarch64linux32
aarch64linux32b
armelfb_linux_eabi
armelf_linux_eabi

I am hoping you or someone familiar with ABI or something related and shed some light.

York

#1 lore raw
Quoted 41 lines

-----Original Messages-----
From: "York Sun" <[email protected]>
Sent Time: 2014-03-22 02:10:39 (Saturday)
To: "Scott Wood" <[email protected]>
Cc: FengHua <[email protected]>, "u-boot at lists.denx.de" <[email protected]>
Subject: CONFIG_REMAKE_ELF for aarch64

Scott,

I am having a problem recreating u-boot.elf for aarch64 targets. The file is OK when Ttext is aligned with 64KB boundary, for example 0x30000000. But if I use 0x30001000 as the text base, the result u-boot.elf has additional offset of 0x10000. For example, the first instruction should be (from objdump)

30001000: 1400000a b 30001028

But it is

30011000: 1400000a b 30011028

My gcc version is

gcc version 4.8.3 20131202 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.12
- Linaro GCC 2013.11)

GNU ld (crosstool-NG linaro-1.13.1-4.8-2013.12 - Linaro GCC 2013.11) 2.24.0.20131220
Supported emulations:

   aarch64linux
   aarch64elf
   aarch64elf32
   aarch64elf32b
   aarch64elfb
   armelf
   armelfb
   aarch64linuxb
   aarch64linux32
   aarch64linux32b
   armelfb_linux_eabi
   armelf_linux_eabi
Quoted 4 lines

I am hoping you or someone familiar with ABI or something related and shed some light.

York

Maybe this is a bug of aarch64 tool chain.

David

author
#2 lore raw
Quoted 41 lines · FengHua
Quoted 41 lines

-----Original Messages-----
From: "York Sun" <[email protected]>
Sent Time: 2014-03-22 02:10:39 (Saturday)
To: "Scott Wood" <[email protected]>
Cc: FengHua <[email protected]>, "u-boot at lists.denx.de" <[email protected]>
Subject: CONFIG_REMAKE_ELF for aarch64

Scott,

I am having a problem recreating u-boot.elf for aarch64 targets. The file is OK when Ttext is aligned with 64KB boundary, for example 0x30000000. But if I use 0x30001000 as the text base, the result u-boot.elf has additional offset of 0x10000. For example, the first instruction should be (from objdump)

30001000: 1400000a b 30001028

But it is

30011000: 1400000a b 30011028

My gcc version is

gcc version 4.8.3 20131202 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.12
- Linaro GCC 2013.11)

GNU ld (crosstool-NG linaro-1.13.1-4.8-2013.12 - Linaro GCC 2013.11) 2.24.0.20131220
Supported emulations:

   aarch64linux
   aarch64elf
   aarch64elf32
   aarch64elf32b
   aarch64elfb
   armelf
   armelfb
   aarch64linuxb
   aarch64linux32
   aarch64linux32b
   armelfb_linux_eabi
   armelf_linux_eabi
Quoted 7 lines
Quoted 4 lines

I am hoping you or someone familiar with ABI or something related and shed some light.

York

Maybe this is a bug of aarch64 tool chain.

Scott suspects it is an alignment issue with the toolchain. But we didn't get the bottom of it.

York