[Bug binutils/32324] New: Stripping BOLT'ed binaries leads to unwanted behaviour

2024-10-30 Thread avieira at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=32324

Bug ID: 32324
   Summary: Stripping BOLT'ed binaries leads to unwanted behaviour
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: avieira at gcc dot gnu.org
  Target Milestone: ---

Hi,

Similar to https://github.com/llvm/llvm-project/issues/56738 when we use
Binutil's strip to strip a binary optimized with BOLT it leads to diagnostic
messages like:
$ aarch64-none-linux-gnu-strip bolted_binary.out
aarch64-none-linux-gnu-strip: stRViEky: section `.eh_frame' can't be allocated
in segment 2
LOAD: .text .text.cold .eh_frame .eh_frame_hdr
aarch64-none-linux-gnu-strip: stRViEky: section `.eh_frame_hdr' can't be
allocated in segment 2
LOAD: .text .text.cold .eh_frame .eh_frame_hdr 

Upon inspection, just like was pointed out in the llvm ticket linked above it
seems the PHDR and LOAD header have been given the same offset but different
alignments. The resulting binary also segfaults when run.

I am not familiar enough with ELF specs to know whether BOLT is at wrong here,
or this should be allowed. I haven't checked how LLVM fixed this, but the
llvm-strip I used recently did not show this behaviour, so I'm guessing they
have at least worked around it. Any suggestions?

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


[Bug binutils/32324] Stripping BOLT'ed binaries leads to unwanted behaviour

2024-10-30 Thread avieira at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=32324

Andre Vieira  changed:

   What|Removed |Added

 Target||aarch64-none-linux-gnu

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


[Bug binutils/32324] Stripping BOLT'ed binaries leads to unwanted behaviour

2024-10-30 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=32324

Sam James  changed:

   What|Removed |Added

   See Also||https://github.com/llvm/llv
   ||m-project/issues/56738
 CC||sam at gentoo dot org

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


[Bug ld/25207] ld: support --image-base= for elf (and -Ttext-segment -z separate-code strangeness)

2024-10-30 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=25207

--- Comment #3 from Sourceware Commits  ---
The master branch has been updated by H.J. Lu :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=afc1f137e18363138d5fa4c88a9a2816926a3d5c

commit afc1f137e18363138d5fa4c88a9a2816926a3d5c
Author: H.J. Lu 
Date:   Thu Oct 31 05:04:15 2024 +0800

ld-elf/pr25207.d: Pass --no-rosegment to ld

Pass --no-rosegment to ld to support linker configured with
--enable-rosegment,

PR ld/25207
* ld-elf/pr25207.d: Pass --no-rosegment to ld.

Signed-off-by: H.J. Lu 

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


[Bug binutils/32256] Observed local symbols while `-mno-relax' on riscv

2024-10-30 Thread akhilesh.k at samsung dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32256

--- Comment #5 from Akhilesh Kumar  ---

Also I observed R_RISCV_RVC_JUMP and RISCV_BRANCH RISC-V-specific relocations
are completely removed but R_RISCV_PCREL and R_RISCV_CALL_PLT are present in
some modules

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