bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/29319] New: [binutils] strip changes align of GNU_STACK se


From: vries at gcc dot gnu.org
Subject: [Bug binutils/29319] New: [binutils] strip changes align of GNU_STACK segment
Date: Tue, 05 Jul 2022 07:36:49 +0000

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

            Bug ID: 29319
           Summary: [binutils] strip changes align of GNU_STACK segment
           Product: binutils
           Version: 2.39 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Created attachment 14194
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14194&action=edit
gcore-relro-pie.gz

Consider the exec gcore-relro-pie (exec generated by the gdb testsuite), on
which we use strip:
...
$ strip -g -o gcore-relro-pie.stripped gcore-relro-pie
...

The align for the GNU_STACK segment drops from 16 to 8:
...
$ readelf -l -W gcore-relro-pie | egrep "GNU_STACK|Type"
  Type           Offset   VirtAddr           PhysAddr           FileSiz  MemSiz
  Flg Align
  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000
0x000000 RW  0x10
$ readelf -l -W gcore-relro-pie.stripped | egrep "GNU_STACK|Type"
  Type           Offset   VirtAddr           PhysAddr           FileSiz  MemSiz
  Flg Align
  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000
0x000000 RW  0x8
...

This mismatch causes gdb to classify gcore-relro-pie as unsuitable to combine
with a core file generated using gcore-relro-pie.stripped (PR29318).

Binutils needs to be build with --disable-separate-code in order to trigger
this.

-- 
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]