diff options
author | Jim Wilson <jimw@sifive.com> | 2018-02-15 13:48:38 -0800 |
---|---|---|
committer | Jim Wilson <jimw@sifive.com> | 2018-02-15 13:48:38 -0800 |
commit | 09ca4b9d9bd61ecb779386a6cc7796cb05dde1af (patch) | |
tree | 2deb847007a59785cd3f1894539bd8265bc56ead /bfd/elfnn-riscv.c | |
parent | 2a0d98534964649bc6884b7833c6c4089159a6df (diff) | |
download | gdb-09ca4b9d9bd61ecb779386a6cc7796cb05dde1af.zip gdb-09ca4b9d9bd61ecb779386a6cc7796cb05dde1af.tar.gz gdb-09ca4b9d9bd61ecb779386a6cc7796cb05dde1af.tar.bz2 |
RISC-V: Fix relocation failure with zero address sections.
bfd/
* elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
symbols whose section address is zero.
Diffstat (limited to 'bfd/elfnn-riscv.c')
-rw-r--r-- | bfd/elfnn-riscv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c index 931bd1d..0530532 100644 --- a/bfd/elfnn-riscv.c +++ b/bfd/elfnn-riscv.c @@ -3399,8 +3399,14 @@ _bfd_riscv_relax_section (bfd *abfd, asection *sec, { BFD_ASSERT (isym->st_shndx < elf_numsections (abfd)); sym_sec = elf_elfsections (abfd)[isym->st_shndx]->bfd_section; +#if 0 + /* The purpose of this code is unknown. It breaks linker scripts + for embedded development that place sections at address zero. + This code is believed to be unnecessary. Disabling it but not + yet removing it, in case something breaks. */ if (sec_addr (sym_sec) == 0) continue; +#endif symval = sec_addr (sym_sec) + isym->st_value; } } |