Re: Add --enable-linker-verssion
authorAlan Modra <amodra@gmail.com>
Thu, 16 Mar 2023 06:40:07 +0000 (17:10 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 16 Mar 2023 07:00:28 +0000 (17:30 +1030)
commit6752dd75f76457902729a5f03d09fa28ec5d68c3
treece27cbdcc9d0cabe75983869af5822018d30fd7d
parent3e8b13bf7745cde3a0bb027041df7cad4b29b510
Re: Add --enable-linker-verssion

Output sections without any input sections to initialise their flags
have their flags initialised by data statements to LOAD, ALLOC,
HAS_CONTENTS by default.  This is wrong for .comment.  Fix that by
making the script initialise the section type to INFO, one of the
noalloc section types.  That also allows the address of .comment to be
set to zero, as is usual for non-alloc sections.

Also, use source_sh for all of the sourced scripts to set up make
dependencies.

PR 30187
* scripttempl/misc-sections.sc: Set .comment address to zero
and type to INFO.
* scripttempl/ft32.sc: Fix breakages from last edit.
* scripttempl/arclinux.sc: Use source_sh to source DWARF.sc
and misc-sections.sc.
* scripttempl/avr.sc: Likewise.
* scripttempl/dlx.sc: Likewise.
* scripttempl/elf.sc: Likewise.
* scripttempl/elf32cr16.sc: Likewise.
* scripttempl/elf32crx.sc: Likewise.
* scripttempl/elf32msp430.sc: Likewise.
* scripttempl/elf64bpf.sc: Likewise.
* scripttempl/elf64hppa.sc: Likewise.
* scripttempl/elf_chaos.sc: Likewise.
* scripttempl/elfarc.sc: Likewise.
* scripttempl/elfarcv2.sc: Likewise.
* scripttempl/elfd10v.sc: Likewise.
* scripttempl/elfd30v.sc: Likewise.
* scripttempl/elfm68hc11.sc: Likewise.
* scripttempl/elfm68hc12.sc: Likewise.
* scripttempl/elfm9s12z.sc: Likewise.
* scripttempl/elfmicroblaze.sc: Likewise.
* scripttempl/elfxgate.sc: Likewise.
* scripttempl/elfxtensa.sc: Likewise.
* scripttempl/epiphany_4x4.sc: Likewise.
* scripttempl/i386beos.sc: Likewise.
* scripttempl/i386go32.sc: Likewise.
* scripttempl/ia64vms.sc: Likewise.
* scripttempl/ip2k.sc: Likewise.
* scripttempl/iq2000.sc: Likewise.
* scripttempl/mep.sc: Likewise.
* scripttempl/mmo.sc: Likewise.
* scripttempl/nds32elf.sc: Likewise.
* scripttempl/pru.sc: Likewise.
* scripttempl/v850.sc: Likewise.
* scripttempl/v850_rh850.sc: Likewise.
* scripttempl/visium.sc: Likewise.
* scripttempl/xstormy16.sc: Likewise.
* scripttempl/z80.sc: Likewise.
* testsuite/ld-scripts/ld-version-2.d: Don't skip ft32 or pru.
38 files changed:
ld/scripttempl/arclinux.sc
ld/scripttempl/avr.sc
ld/scripttempl/dlx.sc
ld/scripttempl/elf.sc
ld/scripttempl/elf32cr16.sc
ld/scripttempl/elf32crx.sc
ld/scripttempl/elf32msp430.sc
ld/scripttempl/elf64bpf.sc
ld/scripttempl/elf64hppa.sc
ld/scripttempl/elf_chaos.sc
ld/scripttempl/elfarc.sc
ld/scripttempl/elfarcv2.sc
ld/scripttempl/elfd10v.sc
ld/scripttempl/elfd30v.sc
ld/scripttempl/elfm68hc11.sc
ld/scripttempl/elfm68hc12.sc
ld/scripttempl/elfm9s12z.sc
ld/scripttempl/elfmicroblaze.sc
ld/scripttempl/elfxgate.sc
ld/scripttempl/elfxtensa.sc
ld/scripttempl/epiphany_4x4.sc
ld/scripttempl/ft32.sc
ld/scripttempl/i386beos.sc
ld/scripttempl/i386go32.sc
ld/scripttempl/ia64vms.sc
ld/scripttempl/ip2k.sc
ld/scripttempl/iq2000.sc
ld/scripttempl/mep.sc
ld/scripttempl/misc-sections.sc
ld/scripttempl/mmo.sc
ld/scripttempl/nds32elf.sc
ld/scripttempl/pru.sc
ld/scripttempl/v850.sc
ld/scripttempl/v850_rh850.sc
ld/scripttempl/visium.sc
ld/scripttempl/xstormy16.sc
ld/scripttempl/z80.sc
ld/testsuite/ld-scripts/ld-version-2.d