[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Problem with NOTE commit
From: |
Herman ten Brugge |
Subject: |
[Tinycc-devel] Problem with NOTE commit |
Date: |
Thu, 24 Dec 2020 12:00:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
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] Problem with NOTE commit,
Herman ten Brugge <=