RISC-V: The object without priv spec attributes can be linked with any object.
authorNelson Chu <nelson.chu@sifive.com>
Fri, 29 May 2020 08:56:36 +0000 (16:56 +0800)
committerNelson Chu <nelson.chu@sifive.com>
Fri, 5 Jun 2020 04:20:53 +0000 (12:20 +0800)
commit412857647fecd41c45fab0d9c45198a0d2cbf6d5
tree6d7dac8aa992b1ece6b59ad0be9a95929f73d41f
parent3fc6c3dc2af2283bd89f1b1278b39922416e8d1b
RISC-V: The object without priv spec attributes can be linked with any object.

bfd/
* elfnn-riscv.c (riscv_merge_attributes): Add new boolean
priv_may_conflict, in_priv_zero and out_priv_zero to decide whether
the object can be linked according to it's priv attributes.  The object
without any priv spec attributes can be linked with others.  If the first
input object doesn't contain any priv attributes, then we need to copy
the setting from the next input one.  Also report more detailed error
messages to user.

ld/
* testsuite/ld-riscv-elf/attr-merge-priv-spec.d: Rename to
attr-merge-priv-spec-01.d.
* testsuite/ld-riscv-elf/attr-merge-priv-spec-c.s: Set priv spec
to 1.11.
* testsuite/ld-riscv-elf/attr-merge-priv-spec-d.s: Empty priv spec
setting.
* testsuite/ld-riscv-elf/attr-merge-priv-spec-02.d: New testcase.
* testsuite/ld-riscv-elf/attr-merge-priv-spec-03.d: Likewise.
* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d: Likewise.
* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-02.d: Likewise.
* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-03.d: Likewise.
* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-04.d: Likewise.
* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-05.d: Likewise.
* testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-06.d: Likewise.
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Updated.
16 files changed:
bfd/ChangeLog
bfd/elfnn-riscv.c
ld/ChangeLog
ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-01.d [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-02.d [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-03.d [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-c.s [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-d.s [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-01.d [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-02.d [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-03.d [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-04.d [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-05.d [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/attr-merge-priv-spec-failed-06.d [new file with mode: 0644]
ld/testsuite/ld-riscv-elf/attr-merge-priv-spec.d [deleted file]
ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp
This page took 0.026303 seconds and 4 git commands to generate.