The recent commit 'ELF: include SHT_NOTE sections everywhere' does not
work for me on x86_64.
The problem is in /usr/lib64/crt1.o
If I do: readelf -a -W /usr/lib64/crt1.o | grep .gnu.build.attributes.hot
I get:
[64] .gnu.build.attributes.hot NOTE 0000000000000000
0002e0 000028 00 G 0 0 4
[65] .rela.gnu.build.attributes.hot RELA 0000000000000000 001b38
000030 18 IG 90 64 8
[72] .gnu.build.attributes.hot NOTE 0000000000000000
000380 000028 00 G 0 0 4
[73] .rela.gnu.build.attributes.hot RELA 0000000000000000 001bf8
000030 18 IG 90 72 8
[80] .gnu.build.attributes.hot NOTE 0000000000000000
000420 000028 00 G 0 0 4
[81] .rela.gnu.build.attributes.hot RELA 0000000000000000 001cb8
000030 18 IG 90 80 8
[ 64] .gnu.build.attributes.hot
[ 65] .rela.gnu.build.attributes.hot
[ 72] .gnu.build.attributes.hot
[ 73] .rela.gnu.build.attributes.hot
[ 80] .gnu.build.attributes.hot
[ 81] .rela.gnu.build.attributes.hot
The tcc_load_object_file tries to merge the sections and then adjust the
reloads.
This does not work in this case because there are 3 section with the
same name.
The result is that memtest aborts with:
------------ memtest ------------
free(): invalid next size (normal)
make[2]: *** [Makefile:182: memtest] Aborted (core dumped)
make[1]: *** [Makefile:89: all] Error 2
make[1]: Leaving directory '/home/herman/tcc_git/tinycc.tst/tests'
make: *** [Makefile:404: test] Error 2
If I revert the change everything works as normal.
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel