binutils-gdb/ld/testsuite/ld-powerpc/ppc476-shared.d
Nick Clifton e922d1eaa3 Add ability to change linker warning messages into errors when reporting executable stacks and/or executable segments.
include
  * bfdlink.h (struct bfd_link_info): Update descriptions of the 'execstack', 'noexecstack' and 'warn_execstack' fields. Add 'error_exectack' and 'warn_is_error_for_rwx_segments' fields.

  bfd
  * elf.c (assign_file_positions_except_relocs): Turn warnings about executable segments into errors if so requested.
  * elflink.c (bfd_elf_size_dynamic_sections): Turn warnings about executable stacks into errors if so requested.

  ld
  * ldlex.h (enum option_values): Add OPTION_ERROR_EXECSTACK, OPTION_NO_ERROR_EXECSTACK, OPTION_WARN_EXECSTACK_OBJECTS, OPTION_ERROR_RWX_SEGMENTS and OPTION_NO_ERROR_RWX_SEGMENTS. (struct ld_option): Add new long options. (parse_args): Parse new long options. (elf_static_list_options): Display the new options.
  * ld.texi: Document the new command line options.
  * configure.ac (error-execstack): New configuration option. (error-rwx-segments): New configuration option.
  * emultempl/elf.em (_before_parse): Initialse the new linkinfo fields.
  * NEWS: Mention the new features.
  * config.in: Regenerate.
  * configure: Regenerate.
  * testsuite/ld-elf/commonpage2.d: Disable errors for RWX segments and/or executable stacks.
  * testsuite/ld-elf/elf.exp: Likewise.
  * testsuite/ld-elf/header.d: Likewise.
  * testsuite/ld-elf/loadaddr1.d: Likewise.
  * testsuite/ld-elf/loadaddr2.d: Likewise.
  * testsuite/ld-elf/maxpage4.d: Likewise.
  * testsuite/ld-elf/nobits-1.d: Likewise.
  * testsuite/ld-elf/note-1.d: Likewise.
  * testsuite/ld-elf/orphan-10.d: Likewise.
  * testsuite/ld-elf/orphan-11.d: Likewise.
  * testsuite/ld-elf/orphan-12.d: Likewise.
  * testsuite/ld-elf/orphan-5.d: Likewise.
  * testsuite/ld-elf/orphan-7.d: Likewise.
  * testsuite/ld-elf/orphan-8.d: Likewise.
  * testsuite/ld-elf/orphan-9.d: Likewise.
  * testsuite/ld-elf/orphan-region.d: Likewise.
  * testsuite/ld-elf/orphan.d: Likewise.
  * testsuite/ld-elf/pr19539.d: Likewise.
  * testsuite/ld-elf/pr26256-1a.d: Likewise.
  * testsuite/ld-elf/pr26907.d: Likewise.
  * testsuite/ld-elf/pr28597.d: Likewise.
  * testsuite/ld-elf/retain2.d: Likewise.
  * testsuite/ld-elf/shared.exp: Likewise.
  * testsuite/ld-elf/size-1.d: Likewise.
  * testsuite/ld-elf/textaddr7.d: Likewise.
  * testsuite/ld-elf/warn1.d: Likewise.
  * testsuite/ld-elf/warn2.d: Likewise.
  * testsuite/ld-i386/discarded1.d: Likewise.
  * testsuite/ld-i386/pr19175.d: Likewise.
  * testsuite/ld-i386/pr19539.d: Likewise.
  * testsuite/ld-i386/pr23189.d: Likewise.
  * testsuite/ld-plugin/lto-3r.d: Likewise.
  * testsuite/ld-plugin/lto-5r.d: Likewise.
  * testsuite/ld-plugin/lto.exp: Likewise.
  * testsuite/ld-powerpc/ppc476-shared.d: Likewise.
  * testsuite/ld-powerpc/ppc476-shared2.d: Likewise.
  * testsuite/ld-powerpc/pr28827-2.d: Likewise.
  * testsuite/ld-s390/s390.exp: Likewise.
  * testsuite/ld-scripts/align2a.d: Likewise.
  * testsuite/ld-scripts/align2b.d: Likewise.
  * testsuite/ld-scripts/align5.d: Likewise.
  * testsuite/ld-scripts/alignof.exp: Likewise.
  * testsuite/ld-scripts/crossref.exp: Likewise.
  * testsuite/ld-scripts/defined2.d: Likewise.
  * testsuite/ld-scripts/defined3.d: Likewise.
  * testsuite/ld-scripts/defined5.d: Likewise.
  * testsuite/ld-scripts/pr14962.d: Likewise.
  * testsuite/ld-scripts/pr18963.d: Likewise.
  * testsuite/ld-scripts/pr20302.d: Likewise.
  * testsuite/ld-scripts/print-memory-usage.exp: Likewise.
  * testsuite/ld-scripts/rgn-at1.d: Likewise.
  * testsuite/ld-scripts/rgn-at10.d: Likewise.
  * testsuite/ld-scripts/rgn-at4.d: Likewise.
  * testsuite/ld-scripts/rgn-at6.d: Likewise.
  * testsuite/ld-scripts/rgn-at8.d: Likewise.
  * testsuite/ld-scripts/rgn-at9.d: Likewise.
  * testsuite/ld-scripts/rgn-over1.d: Likewise.
  * testsuite/ld-scripts/rgn-over2.d: Likewise.
  * testsuite/ld-scripts/rgn-over4.d: Likewise.
  * testsuite/ld-scripts/rgn-over5.d: Likewise.
  * testsuite/ld-scripts/rgn-over6.d: Likewise.
  * testsuite/ld-scripts/script.exp: Likewise.
  * testsuite/ld-scripts/sizeof.exp: Likewise.
  * testsuite/ld-scripts/sort-file.d: Likewise.
  * testsuite/ld-x86-64/discarded1.d: Likewise.
  * testsuite/ld-x86-64/pr19175.d: Likewise.
  * testsuite/ld-x86-64/pr19539a.d: Likewise.
  * testsuite/ld-x86-64/pr19539b.d: Likewise.
  * testsuite/ld-x86-64/pr23189.d: Likewise.
2023-11-10 11:37:27 +00:00

49 lines
1.9 KiB
Makefile

#source: ppc476-shared.s
#as: -a32
#ld: -melf32ppc -q -shared -z common-page-size=0x10000 -z notext --ppc476-workaround -T ppc476-shared.lnk --no-error-rwx-segments
#objdump: -dr
#target: powerpc*-*-*
.*: file format .*
Disassembly of section \.text:
0000fffc <\.text>:
fffc: (48 03 00 04|04 00 03 48) b 40000 .*
10000: (38 63 00 00|00 00 63 38) addi r3,r3,0
1000[02]: R_PPC_ADDR16_LO \.bss
\.\.\.
1fffc: (48 02 00 14|14 00 02 48) b 40010 .*
20000: (38 63 00 00|00 00 63 38) addi r3,r3,0
2000[02]: R_PPC_ADDR16_LO \.bss
\.\.\.
2fffc: (48 01 00 24|24 00 01 48) b 40020 .*
30000: (38 63 00 00|00 00 63 38) addi r3,r3,0
3000[02]: R_PPC_ADDR16_LO \.bss
\.\.\.
3fff0: (42 9f 00 05|05 00 9f 42) bcl .*
3fff4: (7d 28 02 a6|a6 02 28 7d) mflr r9
3fff8: (3d 29 00 01|01 00 29 3d) addis r9,r9,1
3fff[8a]: R_PPC_REL16_HA \.bss\+0x[46]
3fffc: (48 00 00 34|34 00 00 48) b 40030 .*
40000: (3c 60 00 00|00 00 60 3c) lis r3,0
4000[02]: R_PPC_ADDR16_HA \.bss
40004: (4b fc ff fc|fc ff fc 4b) b 10000 .*
40008: (48 00 00 02|02 00 00 48) ba 0 .*
4000c: (48 00 00 02|02 00 00 48) ba 0 .*
40010: (3c 60 00 00|00 00 60 3c) lis r3,0
4001[02]: R_PPC_ADDR16_HA \.bss
40014: (4b fd ff ec|ec ff fd 4b) b 20000 .*
40018: (48 00 00 02|02 00 00 48) ba 0 .*
4001c: (48 00 00 02|02 00 00 48) ba 0 .*
40020: (3c 60 00 00|00 00 60 3c) lis r3,0
4002[02]: R_PPC_ADDR16_HA \.bss
40024: (4b fe ff dc|dc ff fe 4b) b 30000 .*
40028: (48 00 00 02|02 00 00 48) ba 0 .*
4002c: (48 00 00 02|02 00 00 48) ba 0 .*
40030: (39 29 00 0c|0c 00 29 39) addi r9,r9,12
4003[02]: R_PPC_REL16_LO \.bss\+0x3[ce]
40034: (4b ff ff cc|cc ff ff 4b) b 40000 .*
40038: (48 00 00 02|02 00 00 48) ba 0 .*
4003c: (48 00 00 02|02 00 00 48) ba 0 .*