mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
RISC-V: avoid ld crashes due to bogus use by testcases
Specifying a little-endian emulation isn't very helpful when the target is big-endian (and hence gas defaults to that). Surely the linker better wouldn't crash when invoked like this, but making sure of this isn't the purpose of any of these tests (afaict). Make assembly output match linker options. With this the ld testsuite completes successfully for me. binutils and gas testsuites still have issues.
This commit is contained in:
parent
f153f575c8
commit
43720b0cdd
29 changed files with 29 additions and 29 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#source: align-small-region.s
|
||||
#as: -march=rv32i
|
||||
#as: -march=rv32i -mlittle-endian
|
||||
#ld: -melf32lriscv --relax -Talign-small-region.ld --defsym=_start=0x100
|
||||
#objdump: -d
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medany__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medany__=1
|
||||
#ld: -Tcode-model-01.ld -melf64lriscv --no-relax
|
||||
#error: .*relocation truncated to fit: R_RISCV_GOT_HI20 against symbol `symbolG'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medany__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medany__=1
|
||||
#ld: -Tcode-model-02.ld -melf64lriscv --no-relax
|
||||
#objdump: -d -Mno-aliases
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medany__=1 --defsym __undefweak__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medany__=1 --defsym __undefweak__=1
|
||||
#ld: -Tcode-model-01.ld -melf64lriscv --no-relax
|
||||
#error: .*relocation truncated to fit: R_RISCV_GOT_HI20 against undefined symbol `symbolW'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medany__=1 --defsym __undefweak__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medany__=1 --defsym __undefweak__=1
|
||||
#ld: -Tcode-model-02.ld -melf64lriscv --no-relax
|
||||
#objdump: -d -Mno-aliases
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medlow__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medlow__=1
|
||||
#ld: -Tcode-model-01.ld -melf64lriscv --no-relax
|
||||
#error: .*relocation truncated to fit: R_RISCV_HI20 against `symbolL'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medlow__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medlow__=1
|
||||
#ld: -Tcode-model-02.ld -melf64lriscv --no-relax
|
||||
#objdump: -d -Mno-aliases
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medlow__=1 --defsym __undefweak__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medlow__=1 --defsym __undefweak__=1
|
||||
#ld: -Tcode-model-01.ld -melf64lriscv --no-relax
|
||||
#objdump: -d -Mno-aliases
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medlow__=1 --defsym __undefweak__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medlow__=1 --defsym __undefweak__=1
|
||||
#ld: -Tcode-model-02.ld -melf64lriscv --no-relax
|
||||
#objdump: -d -Mno-aliases
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medany__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medany__=1
|
||||
#ld: -Tcode-model-01.ld -melf64lriscv --relax
|
||||
#error: .*relocation truncated to fit: R_RISCV_GOT_HI20 against symbol `symbolG'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medany__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medany__=1
|
||||
#ld: -Tcode-model-02.ld -melf64lriscv --relax
|
||||
#objdump: -d -Mno-aliases
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medany__=1 --defsym __undefweak__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medany__=1 --defsym __undefweak__=1
|
||||
#ld: -Tcode-model-01.ld -melf64lriscv --relax
|
||||
#error: .*relocation truncated to fit: R_RISCV_GOT_HI20 against undefined symbol `symbolW'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medany__=1 --defsym __undefweak__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medany__=1 --defsym __undefweak__=1
|
||||
#ld: -Tcode-model-02.ld -melf64lriscv --relax
|
||||
#objdump: -d -Mno-aliases
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medlow__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medlow__=1
|
||||
#ld: -Tcode-model-01.ld -melf64lriscv --no-relax-gp --relax
|
||||
#error: .*relocation truncated to fit: R_RISCV_HI20 against `symbolL'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medlow__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medlow__=1
|
||||
#ld: -Tcode-model-01.ld -melf64lriscv --relax
|
||||
#objdump: -d -Mno-aliases
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medlow__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medlow__=1
|
||||
#ld: -Tcode-model-02.ld -melf64lriscv --relax
|
||||
#objdump: -d -Mno-aliases
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medlow__=1 --defsym __undefweak__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medlow__=1 --defsym __undefweak__=1
|
||||
#ld: -Tcode-model-01.ld -melf64lriscv --relax
|
||||
#objdump: -d -Mno-aliases
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: code-model.s
|
||||
#as: -march=rv64i -mabi=lp64 --defsym __medlow__=1 --defsym __undefweak__=1
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian --defsym __medlow__=1 --defsym __undefweak__=1
|
||||
#ld: -Tcode-model-02.ld -melf64lriscv --relax
|
||||
#objdump: -d -Mno-aliases
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#source: pcrel-reloc.s
|
||||
#source: pcrel-reloc-abs.s
|
||||
#as: -march=rv64i -mabi=lp64
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian
|
||||
#ld: -melf64lriscv --no-pie --no-relax
|
||||
#objdump: -d
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: pcrel-reloc.s
|
||||
#source: pcrel-reloc-abs.s
|
||||
#as: -march=rv64i -mabi=lp64
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian
|
||||
#ld: -melf64lriscv --pie --no-relax
|
||||
#error: .*relocation R_RISCV_PCREL_HI20 against absolute symbol `sym' can not be used when making a shared objec.*t
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#source: pcrel-reloc.s
|
||||
#source: pcrel-reloc-rel.s
|
||||
#as: -march=rv64i -mabi=lp64
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian
|
||||
#ld: -melf64lriscv --no-pie --no-relax
|
||||
#objdump: -d
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#source: pcrel-reloc.s
|
||||
#source: pcrel-reloc-rel.s
|
||||
#as: -march=rv64i -mabi=lp64
|
||||
#as: -march=rv64i -mabi=lp64 -mlittle-endian
|
||||
#ld: -melf64lriscv --pie --no-relax
|
||||
#objdump: -d
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#name: RISC-V GNU Property (multiple inputs, combine section) - 1
|
||||
#source: property1.s
|
||||
#source: property2.s
|
||||
#as: -march=rv64g
|
||||
#as: -march=rv64g -mlittle-endian
|
||||
#ld: -shared -melf64lriscv
|
||||
#readelf: -n
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#name: RISC-V GNU Property (multiple inputs, combine section) - 2
|
||||
#source: property1.s
|
||||
#source: property3.s
|
||||
#as: -march=rv64g
|
||||
#as: -march=rv64g -mlittle-endian
|
||||
#ld: -shared -melf64lriscv
|
||||
#readelf: -n
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#name: RISC-V GNU Property (multiple inputs, combine section) - 3
|
||||
#source: property1.s
|
||||
#source: property4.s
|
||||
#as: -march=rv64g
|
||||
#as: -march=rv64g -mlittle-endian
|
||||
#ld: -shared -melf64lriscv
|
||||
#readelf: -n
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#name: GNU Property (single input, CFI_LP_UNLABELED)
|
||||
#source: property-zicfilp-unlabeled.s
|
||||
#as: -march=rv64g
|
||||
#as: -march=rv64g -mlittle-endian
|
||||
#ld: -shared -melf64lriscv
|
||||
#readelf: -n
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#name: GNU Property (single input, CFI_SS)
|
||||
#source: property-zicfiss.s
|
||||
#as: -march=rv64g
|
||||
#as: -march=rv64g -mlittle-endian
|
||||
#ld: -shared -melf64lriscv
|
||||
#readelf: -n
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#source: uleb128.s
|
||||
#as: -march=rv32ic
|
||||
#as: -march=rv32ic -mlittle-endian
|
||||
#ld: -melf32lriscv
|
||||
#objdump: -d
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#source: zicfilp-unlabeled-plt.s
|
||||
#ld: -shared -melf64lriscv
|
||||
#objdump: -dr -j .plt
|
||||
#as: -march=rv64gc_zicfilp
|
||||
#as: -march=rv64gc_zicfilp -mlittle-endian
|
||||
|
||||
[^:]*: *file format elf64-.*riscv
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue