Bug 29957

Summary: or1k custom linker script used in testsuite always triggers LOAD segment with RWX permissions warning
Product: gdb Reporter: Mike Frysinger <vapier>
Component: simAssignee: Stafford Horne <shorne>
Status: RESOLVED FIXED    
Severity: normal CC: nickc, sam, shorne, shorne, vapier
Priority: P2    
Version: unknown   
Target Milestone: ---   
Host: Target: or1k-elf
Build: Last reconfirmed:

Description Mike Frysinger 2023-01-03 06:09:48 UTC
using the or1k-elf target, sim testsuite fails now due to linker warnings ever since this change:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
Author: Nick Clifton <nickc@redhat.com>
Date:   Tue May 3 11:42:24 2022 +0100
Add a linker warning when creating potentially dangerous executable segments.  Add tests, options to disabke and configure switches to choose defaults.

to reproduce:
$ or1k-elf-cc -Isim/testsuite/or1k -Wa,-Isim/testsuite/or1k -c -o load.S.o sim/testsuite/or1k/load.S
$ ./ld/ld-new load.S.o -T sim/testsuite/or1k/or1k-test.ld -o load.S.x
./ld/ld-new: warning: load.S.x has a LOAD segment with RWX permissions
Comment 1 Stafford Horne 2023-08-19 10:03:59 UTC
I have posted a patch for this to the list at: https://sourceware.org/pipermail/binutils/2023-August/129109.html