Actions
Bug #15466
openctfconvert fails with R_386_GOTOFF relocation in debug_info section
Status:
New
Priority:
Normal
Assignee:
-
Category:
tools - gate/build tools
Start date:
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
While doing test build with gcc 12, the build failed with libc. The errors appear while building i386_hwcap? variants.
/code/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/ctfconvert -L VERSION pics/fmtmsg.o ctfconvert: CTF conversion failed due to missing debug data; use -m to override *** Error code 1 make: Fatal error: Command failed for target `pics/fmtmsg.o'
Investigating the issue, the error happens when we are processing relocations in libdwarf, the _dwarf_is_32bit_abs_reloc() function does not accept relocation type R_386_GOTOFF and the relocation process will exit with error.
And indeed, checking with elfdump:
Relocation Section: .rel.debug_info type offset section symbol ... R_386_32 0xead .rel.debug_inf .text (section) R_386_GOTOFF 0xec1 .rel.debug_inf .LC3 R_386_32 0xec8 .rel.debug_inf .text (section) ...
Updated by Toomas Soome 3 months ago
Rich Lowe wrote in #note-2:
Are you sure that you remembered to pass -gstrict-dwarf in the gcc12 case? The default Makefiles only do it for 10 and 11
indeed, -gstrict-dwarf does help to keep R_386_GOTOFF away.
Actions