Hi Andrew,
2011/4/28 Andrew Stubbs andrew.stubbs@linaro.org:
On 28/04/11 09:59, Barry Song wrote:
my other two mails explain what happened, in fact link input file is simple:
There must be more than one input file to the link, otherwise I believe
you
wouldn't see this problem. We need to find out what the other ones are.
ASSERT found just because we are using -nostdlib flag since we don't call any library. This flag changed out_attr[Tag_FP_arch] to 0, which is generically 4 for linaro new toolchain by watching a normal compile/link process.
The -nostdlib flag only changes the list of libraries that will be linked. It shouldn't change any attributes directly.
Here's how a link should work, if I understand it correctly:
- The linker creates an empty output file (conceptually). This file will
have all attributes set to default settings (i.e. zero).
- Each input file is then merged into the output file in turn. New
sections
are added, or existing ones appended to, and the symbol tables and such
are
built incrementally. At each step, the attributes are merged from the
input
file to the output file.
For the first input file, the attribute merge is basically just a copy.
Both
Tag_FP_arch and Tag_ABI_HardFP_use should be zero in the (empty) output file, so we should not be able to hit this condition.
For the second input file, the attribute merge is more complicated. For
each
attribute the result will be either be the union, or the intersection of
the
two attributes, or else it will throw an error.
So, it should be that this can't happen, but clearly it does, so something is broken, but I can't tell what without reproducing it, or at least
seeing
what inputs you're dealing with.
So, please help me figure out what the full set of input files are and I
see
if I can work from there.
Thanks very much. i can't send you all source codes, but i can send you the related binaries causing ASSERT. All link log is as below. Note the red part is where ASSERT happen. Input is dir_soc.o, output is a elf file. It is the first time the elf file begin to born.
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/soc/prima2/chip/nand_controller/soc_nand/dir_soc_nand.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/soc/prima2/chip/nand_controller/dir_nand_controller.o
-------------------------------------!
make[6]: Leaving directory `/home/vmuser/development/svn/Current/Linux/Main/firmware/nanddisk/src/soc/prima2/chip/nand_controller' make[6]: Entering directory `/home/vmuser/development/svn/Current/Linux/Main/firmware/nanddisk/src/soc/prima2/chip/zone_mgr' make[6]: Leaving directory `/home/vmuser/development/svn/Current/Linux/Main/firmware/nanddisk/src/soc/prima2/chip/zone_mgr'
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/soc/prima2/chip/nand_controller/dir_nand_controller.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/soc/prima2/chip/dir_chip.o
-------------------------------------!
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/soc/prima2/chip/zone_mgr/dir_zone_mgr.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/soc/prima2/chip/dir_chip.o
-------------------------------------!
make[5]: Leaving directory `/home/vmuser/development/svn/Current/Linux/Main/firmware/nanddisk/src/soc/prima2/chip' make[5]: Entering directory `/home/vmuser/development/svn/Current/Linux/Main/firmware/nanddisk/src/soc/prima2/prima2cb'
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/soc/prima2/prima2cb/nand/dir_nand.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/soc/prima2/prima2cb/dir_prima2cb.o
-------------------------------------!
make[5]: Leaving directory `/home/vmuser/development/svn/Current/Linux/Main/firmware/nanddisk/src/soc/prima2/prima2cb'
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/soc/prima2/prima2cb/dir_prima2cb.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/soc/prima2/dir_prima2.o
-------------------------------------!
make[4]: Leaving directory `/home/vmuser/development/svn/Current/Linux/Main/firmware/nanddisk/src/soc/prima2' make[3]: Leaving directory `/home/vmuser/development/svn/Current/Linux/Main/firmware/nanddisk/src/soc' ------------------------------------------ Building NANDDisk.bin /home/vmuser/development/toolchain/build-toolchain/tools-64/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.3/../../../../arm-none-linux-gnueabi/bin/ld: mode armelf_linux_eabi /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/common/dir_common.o /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/soc/dir_soc.o (../stdlib/libgcc.a)_udivsi3.o (../stdlib/libgcc.a)_dvmd_tls.o (../stdlib/libgcc.a)_aeabi_uldivmod.o (../stdlib/libgcc.a)_muldi3.o (../stdlib/libgcc.a)bpabi.o (../stdlib/libgcc.a)_divdi3.o (../stdlib/libgcc.a)_udivdi3.o (../stdlib/libgcc.a)unwind-arm.o (../stdlib/libgcc.a)libunwind.o (../stdlib/libgcc.a)pr-support.o (../stdlib/libgcc.a)_clz.o
!------------------------------------- !!!!!!!!!!!!!!!! out_attr[i].i:0, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk/soc/dir_soc.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk.elf!!!!!!!!!!!!!!!!!!!!!
-------------------------------------!
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:0 ibfd: _udivsi3.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk.elf
-------------------------------------!
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:0 ibfd: _dvmd_tls.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk.elf
-------------------------------------!
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:0 ibfd: _aeabi_uldivmod.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk.elf
-------------------------------------!
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: _muldi3.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk.elf
-------------------------------------!
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: bpabi.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk.elf
-------------------------------------!
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: _divdi3.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk.elf
-------------------------------------!
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: _udivdi3.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk.elf
-------------------------------------!
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: unwind-arm.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk.elf
-------------------------------------!
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:0 ibfd: libunwind.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk.elf
-------------------------------------!
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: pr-support.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk.elf
-------------------------------------!
!------------------------------------- out_attr[i].i:2, out_attr[Tag_ABI_HardFP_use].i:3, in_attr[i].i:2, in_attr[Tag_ABI_HardFP_use].i:3 ibfd: _clz.o obfd: /home/vmuser/development/svn/Current/Linux/Main/out/prima2cb/.obj/firmware/nanddisk/NANDDisk.elf
-------------------------------------!
Size: 135168 bytes. Binary Done! Success! ------------------------------------------ make[2]: Leaving directory `/home/vmuser/development/svn/Current/Linux/Main/firmware/nanddisk/src' make[1]: Leaving directory `/home/vmuser/development/svn/Current/Linux/Main/firmware/nanddisk'
Thanks
Andrew