SHA256
1
0
forked from pool/binutils

Accepting request 585020 from devel:gcc

- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes (forwarded request 584502 from Andreas_Schwab)

OBS-URL: https://build.opensuse.org/request/show/585020
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/binutils?expand=0&rev=125
This commit is contained in:
Dominique Leuenberger 2018-03-12 11:02:40 +00:00 committed by Git OBS Bridge
commit 7ea5d4071b
45 changed files with 198 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -94,6 +94,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -165,6 +166,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 8 11:33:31 UTC 2018 - schwab@suse.de
- riscv-relax-size.patch: Fix symbol size bug when relaxation deletes bytes
-------------------------------------------------------------------
Tue Mar 6 16:01:24 UTC 2018 - matz@suse.com

View File

@ -97,6 +97,7 @@ Patch22: binutils-bfd_h.patch
Patch34: aarch64-common-pagesize.patch
Patch35: riscv-wrap-relax.patch
Patch36: binutils-pr22868.diff
Patch37: riscv-relax-size.patch
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: cross-avr-size.patch
@ -168,6 +169,7 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90

44
riscv-relax-size.patch Normal file
View File

@ -0,0 +1,44 @@
2018-03-01 Jim Wilson <jimw@sifive.com>
PR 22756
* elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
else if instead of if.
Index: binutils-2.30/bfd/elfnn-riscv.c
===================================================================
--- binutils-2.30.orig/bfd/elfnn-riscv.c
+++ binutils-2.30/bfd/elfnn-riscv.c
@@ -2639,10 +2639,16 @@ riscv_relax_delete_bytes (bfd *abfd, ase
/* If the symbol *spans* the bytes we just deleted (i.e. its
*end* is in the moved bytes but its *start* isn't), then we
- must adjust its size. */
- if (sym->st_value <= addr
- && sym->st_value + sym->st_size > addr
- && sym->st_value + sym->st_size <= toaddr)
+ must adjust its size.
+
+ This test needs to use the original value of st_value, otherwise
+ we might accidentally decrease size when deleting bytes right
+ before the symbol. But since deleted relocs can't span across
+ symbols, we can't have both a st_value and a st_size decrease,
+ so it is simpler to just use an else. */
+ else if (sym->st_value <= addr
+ && sym->st_value + sym->st_size > addr
+ && sym->st_value + sym->st_size <= toaddr)
sym->st_size -= count;
}
}
@@ -2690,9 +2696,9 @@ riscv_relax_delete_bytes (bfd *abfd, ase
sym_hash->root.u.def.value -= count;
/* As above, adjust the size if needed. */
- if (sym_hash->root.u.def.value <= addr
- && sym_hash->root.u.def.value + sym_hash->size > addr
- && sym_hash->root.u.def.value + sym_hash->size <= toaddr)
+ else if (sym_hash->root.u.def.value <= addr
+ && sym_hash->root.u.def.value + sym_hash->size > addr
+ && sym_hash->root.u.def.value + sym_hash->size <= toaddr)
sym_hash->size -= count;
}
}