bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/28743] New: BFD ld: ELF LOAD segments creating holes in the proc


From: fweimer at redhat dot com
Subject: [Bug ld/28743] New: BFD ld: ELF LOAD segments creating holes in the process image on GNU/Linux
Date: Mon, 03 Jan 2022 15:34:56 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28743

            Bug ID: 28743
           Summary: BFD ld: ELF LOAD segments creating holes in the
                    process image on GNU/Linux
           Product: binutils
           Version: 2.37
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
                CC: hjl.tools at gmail dot com
  Target Milestone: ---
             Flags: security-

BFD ld sometimes creates executables that have holes between PT_LOAD segments.

An example is /usr/bin/psql in postgresql-13.4-2.fc35.x86_64 (Fedora 35).

The kernel creates an actual hole, as can be seen from /proc/self/maps:

5591bcaa6000-5591bcab9000 r--p 00000000 103:02 271992                   
/usr/bin/psql
5591bcab9000-5591bcb0b000 r-xp 00013000 103:02 271992                   
/usr/bin/psql
5591bcb0b000-5591bcb49000 r--p 00065000 103:02 271992                   
/usr/bin/psql
[49096 byte hole here]
5591bcb4a000-5591bcb52000 r--p 000a3000 103:02 271992                   
/usr/bin/psql
5591bcb52000-5591bcb53000 rw-p 000ab000 103:02 271992                   
/usr/bin/psql

I assume this position-independent executable was linked with -z separate-code
(our toolchain default). binutils-2.37-10.fc35.x86_64 was used for this build.

This does not happen for all executables. I do not know the triggering
conditions.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]