#1089617 gcc-13: linking with -no-pie -pg on mipsel64 produces bogus __executable_start/etext pair

Package:
gcc-13
Source:
gcc-13
Description:
GNU C compiler
Submitter:
Camm Maguire
Date:
2024-12-10 00:03:02 UTC
Severity:
normal
#1089617#5
Date:
2024-12-09 17:16:40 UTC
From:
To:
Dear Maintainer,

Recently gcl27 fails on mipsel64 alone.  All binaries are linked with
-no-pie, and some with -pg as well.  In the latter case,
__executable_start takes on the high address of 0x0000000120000000, but
etext is missing the upper bits at 0x00000000005a4db8, leading to a
segfault in monstartup/calloc.  In a basic main.c compiled similarly, I
cannot reproduce the problem, as etext is correctly placed above
__executable_start.  Something seems to be overflowing with the larger
executable but I cannot pinpoint it.  It is also very recent.

(sid_mips64el-dchroot)camm@eberlin:~/gcl/gcl/unixport$ readelf -a raw_gcl_gprof |grep __executable_
 14326: 0000000120000000     0 NOTYPE  LOCAL  DEFAULT    1 __executable_start
(sid_mips64el-dchroot)camm@eberlin:~/gcl/gcl/unixport$ readelf -a raw_gcl_gprof |grep etext
   670: 00000000005a4db8     0 NOTYPE  GLOBAL DEFAULT   14 etext
 15118: 00000000005a4db8     0 NOTYPE  GLOBAL DEFAULT   14 etext
(sid_mips64el-dchroot)camm@eberlin:~/gcl/gcl/unixport$ cd

Take care,