[llvm-dev] clang is not emitting .ARM.extab section?
kamlesh kumar via llvm-dev
llvm-dev at lists.llvm.org
Thu Oct 4 01:07:51 PDT 2018
Hi Devs,
For the below sample :
$cat test.cpp
int foo();
int main(){
int f=foo();
return 0;
}
We compiled with clang(8.1) like
$clang -fno-builtin --target=arm-eabi -mabi=aapcs -mlittle-endian
-mfpu=vfpv3 -mfloat-abi=hard -mcpu=cortex-a9 -O0 test.cpp -c
$readelfarm -S test.o
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk
Inf Al
[ 0] NULL 00000000 000000 000000 00 0
0 0
[ 1] .strtab STRTAB 00000000 0001e8 000085 00 0
0 1
[ 2] .text PROGBITS 00000000 000034 00002c 00 AX 0
0 4
[ 3] .rel.text REL 00000000 0001d0 000008 08 9
2 4
[ 4] .ARM.exidx ARM_EXIDX 00000000 000060 000008 00 AL 2
0 4
[ 5] .rel.ARM.exidx REL 00000000 0001d8 000010 08 9
4 4
[ 6] .comment PROGBITS 00000000 000068 0000ac 01 MS 0
0 1
[ 7] .note.GNU-stack PROGBITS 00000000 000114 000000 00 0
0 1
[ 8] .ARM.attributes ARM_ATTRIBUTES 00000000 000114 000049 00 0
0 1
[ 9] .symtab SYMTAB 00000000 000160 000070 10 1
4 4
And compiled by gcc:
$gcc -fno-builtin -mabi=aapcs -mlittle-endian -mfpu=vfpv3 -mfloat-abi=hard
-mcpu=cortex-a9 -O0 test.cpp -c
$readelf -S test.o
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk
Inf Al
[ 0] NULL 00000000 000000 000000 00 0
0 0
[ 1] .text PROGBITS 00000000 000034 000028 00 AX 0
0 4
[ 2] .rel.text REL 00000000 00025c 000008 08 I 12
1 4
[ 3] .data PROGBITS 00000000 00005c 000000 00 WA 0
0 1
[ 4] .bss NOBITS 00000000 00005c 000000 00 WA 0
0 1
[ 5] .ARM.extab PROGBITS 00000000 00005c 00000c 00 A 0
0 4
[ 6] .ARM.exidx ARM_EXIDX 00000000 000068 000008 00 AL 1
0 4
[ 7] .rel.ARM.exidx REL 00000000 000264 000018 08 I 12
6 4
[ 8] .comment PROGBITS 00000000 000070 000012 01 MS 0
0 1
[ 9] .note.GNU-stack PROGBITS 00000000 000082 000000 00 0
0 1
[10] .ARM.attributes ARM_ATTRIBUTES 00000000 000082 000033 00 0
0 1
[11] .shstrtab STRTAB 00000000 0000b5 000073 00 0
0 1
[12] .symtab SYMTAB 00000000 000128 000100 10 13
13 4
[13] .strtab STRTAB 00000000 000228 000034 00 0
0 1
>From the above sections you see that .ARM.extab and .ARM.exidx sections
are emitted by gcc and in-case of clang only the .ARM.exidx section is
present.
We tried with -funwind-tables option too for clang with no luck and we are
going with ARM EHABI to understand these sections better, meanwhile .
Is that the clang semantics(not emitting the .ARM.extab section ) is
expected ?
~Kamlesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181004/49df3b87/attachment.html>
More information about the llvm-dev
mailing list