.LTHUNK symbols are surviving
Bug #924726 reported by
Ken Werner
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro GCC |
Triaged
|
Medium
|
Unassigned | ||
Debian |
New
|
Undecided
|
Unassigned |
Bug Description
When compiling the attached testcase using the Linaro g++ the resulting object file contains:
$ readelf -s test.o|grep THUNK
11: 00000001 28 FUNC LOCAL DEFAULT 27 .LTHUNK0
23: 00000001 28 FUNC LOCAL DEFAULT 37 .LTHUNK2
35: 00000001 28 FUNC LOCAL DEFAULT 47 .LTHUNK4
This may cause later link steps to fail.
Changed in gcc-linaro: | |
status: | New → Triaged |
To post a comment you must log in.
I encountered the issue when compiling Qt 4.8.0 using -O0. It causes qdbusviewer fail to link:
`.LTHUNK0' referenced in section `.text. _ZN14PropertyDi alogD1Ev[ PropertyDialog: :~PropertyDialo g()]' of .obj/release- shared- emb-arm/ moc_propertydia log.o: defined in discarded section `.text. _ZN14PropertyDi alogD2Ev[ _ZN14PropertyDi alogD5Ev] ' of .obj/release- shared- emb-arm/ moc_propertydia log.o
collect2: ld returned 1 exit status
I noticed that as soon as the main.o (the user of that property dialog) gets built with -O1 (or higher) the link succeeds. I guess that most people who are using the multiple inheritance feature of C++ don't build their sources with -O0 usually. Tha might explain why we didn't see this issue earlier.
However, the .THUNK symbols survive regardless of the optimization level or the mode (arm/thumb). I've checked various GCC versions and the latest binutils (20120131) with the following results: 4.6-2012. 01 arm-linux- gnueabi- 2012.01- 20120125_ linux) linux-gnueabi 4.6.0-8 shipped with Ubunut 11.10 (Oneiric)
affected:
* gcc-linaro-
* Linaro binary toolchain (gcc-linaro-
* g++-arm-
* ARM CSL 2011.03
not affected:
* FSF GCC 4.7 trunk (r183767)
* FSF GCC gcc-4_6-branch (r183768)
* FSF GCC gcc_4_6_0_release (r183772)