diff --git a/binutils.changes b/binutils.changes index 5fcd4a8..d3735f4 100644 --- a/binutils.changes +++ b/binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/binutils.spec b/binutils.spec index 8f4a8e7..454a228 100644 --- a/binutils.spec +++ b/binutils.spec @@ -101,6 +101,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -192,6 +194,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-aarch64-binutils.changes b/cross-aarch64-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-aarch64-binutils.changes +++ b/cross-aarch64-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-aarch64-binutils.spec b/cross-aarch64-binutils.spec index 1353577..455a169 100644 --- a/cross-aarch64-binutils.spec +++ b/cross-aarch64-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-arm-binutils.changes b/cross-arm-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-arm-binutils.changes +++ b/cross-arm-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-arm-binutils.spec b/cross-arm-binutils.spec index 936ef16..771f4ea 100644 --- a/cross-arm-binutils.spec +++ b/cross-arm-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-avr-binutils.changes b/cross-avr-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-avr-binutils.changes +++ b/cross-avr-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-avr-binutils.spec b/cross-avr-binutils.spec index dfbdcd1..1796184 100644 --- a/cross-avr-binutils.spec +++ b/cross-avr-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-epiphany-binutils.changes b/cross-epiphany-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-epiphany-binutils.changes +++ b/cross-epiphany-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-epiphany-binutils.spec b/cross-epiphany-binutils.spec index 2b55650..0d07ff5 100644 --- a/cross-epiphany-binutils.spec +++ b/cross-epiphany-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-hppa-binutils.changes b/cross-hppa-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-hppa-binutils.changes +++ b/cross-hppa-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-hppa-binutils.spec b/cross-hppa-binutils.spec index 9f4e5cd..8459588 100644 --- a/cross-hppa-binutils.spec +++ b/cross-hppa-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-hppa64-binutils.changes b/cross-hppa64-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-hppa64-binutils.changes +++ b/cross-hppa64-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-hppa64-binutils.spec b/cross-hppa64-binutils.spec index 9e38c3a..1a48f8a 100644 --- a/cross-hppa64-binutils.spec +++ b/cross-hppa64-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-i386-binutils.changes b/cross-i386-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-i386-binutils.changes +++ b/cross-i386-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-i386-binutils.spec b/cross-i386-binutils.spec index 2359c43..8564f7f 100644 --- a/cross-i386-binutils.spec +++ b/cross-i386-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-ia64-binutils.changes b/cross-ia64-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-ia64-binutils.changes +++ b/cross-ia64-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-ia64-binutils.spec b/cross-ia64-binutils.spec index cc6092e..4e8559d 100644 --- a/cross-ia64-binutils.spec +++ b/cross-ia64-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-m68k-binutils.changes b/cross-m68k-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-m68k-binutils.changes +++ b/cross-m68k-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-m68k-binutils.spec b/cross-m68k-binutils.spec index 729492e..43ee19d 100644 --- a/cross-m68k-binutils.spec +++ b/cross-m68k-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-mips-binutils.changes b/cross-mips-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-mips-binutils.changes +++ b/cross-mips-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-mips-binutils.spec b/cross-mips-binutils.spec index 8088ce6..76a9801 100644 --- a/cross-mips-binutils.spec +++ b/cross-mips-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-ppc-binutils.changes b/cross-ppc-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-ppc-binutils.changes +++ b/cross-ppc-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-ppc-binutils.spec b/cross-ppc-binutils.spec index 657c841..5b5c07d 100644 --- a/cross-ppc-binutils.spec +++ b/cross-ppc-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-ppc64-binutils.changes b/cross-ppc64-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-ppc64-binutils.changes +++ b/cross-ppc64-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-ppc64-binutils.spec b/cross-ppc64-binutils.spec index d0963aa..8bc1ecd 100644 --- a/cross-ppc64-binutils.spec +++ b/cross-ppc64-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-ppc64le-binutils.changes b/cross-ppc64le-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-ppc64le-binutils.changes +++ b/cross-ppc64le-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-ppc64le-binutils.spec b/cross-ppc64le-binutils.spec index 1a84c43..ba8322f 100644 --- a/cross-ppc64le-binutils.spec +++ b/cross-ppc64le-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-riscv64-binutils.changes b/cross-riscv64-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-riscv64-binutils.changes +++ b/cross-riscv64-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-riscv64-binutils.spec b/cross-riscv64-binutils.spec index ea60e97..a93cac6 100644 --- a/cross-riscv64-binutils.spec +++ b/cross-riscv64-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-rx-binutils.changes b/cross-rx-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-rx-binutils.changes +++ b/cross-rx-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-rx-binutils.spec b/cross-rx-binutils.spec index 53d00ce..ae6167d 100644 --- a/cross-rx-binutils.spec +++ b/cross-rx-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-s390-binutils.changes b/cross-s390-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-s390-binutils.changes +++ b/cross-s390-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-s390-binutils.spec b/cross-s390-binutils.spec index 0c08e1a..ed3f39c 100644 --- a/cross-s390-binutils.spec +++ b/cross-s390-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-s390x-binutils.changes b/cross-s390x-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-s390x-binutils.changes +++ b/cross-s390x-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-s390x-binutils.spec b/cross-s390x-binutils.spec index d37b416..a042b54 100644 --- a/cross-s390x-binutils.spec +++ b/cross-s390x-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-sparc-binutils.changes b/cross-sparc-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-sparc-binutils.changes +++ b/cross-sparc-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-sparc-binutils.spec b/cross-sparc-binutils.spec index a33acc6..56021ec 100644 --- a/cross-sparc-binutils.spec +++ b/cross-sparc-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-sparc64-binutils.changes b/cross-sparc64-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-sparc64-binutils.changes +++ b/cross-sparc64-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-sparc64-binutils.spec b/cross-sparc64-binutils.spec index 0c86af9..30a0360 100644 --- a/cross-sparc64-binutils.spec +++ b/cross-sparc64-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-spu-binutils.changes b/cross-spu-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-spu-binutils.changes +++ b/cross-spu-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-spu-binutils.spec b/cross-spu-binutils.spec index 09134bc..20ef652 100644 --- a/cross-spu-binutils.spec +++ b/cross-spu-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-x86_64-binutils.changes b/cross-x86_64-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-x86_64-binutils.changes +++ b/cross-x86_64-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-x86_64-binutils.spec b/cross-x86_64-binutils.spec index a68e89e..bf649a7 100644 --- a/cross-x86_64-binutils.spec +++ b/cross-x86_64-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/cross-xtensa-binutils.changes b/cross-xtensa-binutils.changes index 5fcd4a8..d3735f4 100644 --- a/cross-xtensa-binutils.changes +++ b/cross-xtensa-binutils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri May 7 15:34:22 UTC 2021 - Andreas Schwab + +- ppc-ensure-undef-dynamic-weak-undefined.patch: PPC: ensure_undef_dynamic + on weak undef only in plt +- ppc-use-local-plt.patch: PowerPC use_local_plt (prerequisite for above + patch) + ------------------------------------------------------------------- Fri Mar 26 10:06:58 UTC 2021 - Martin Liška diff --git a/cross-xtensa-binutils.spec b/cross-xtensa-binutils.spec index 4b0cea2..4e2d1c9 100644 --- a/cross-xtensa-binutils.spec +++ b/cross-xtensa-binutils.spec @@ -104,6 +104,8 @@ Patch38: binutils-fix-invalid-op-errata.diff Patch39: binutils-revert-nm-symversion.diff Patch40: binutils-fix-abierrormsg.diff Patch41: binutils-fix-relax.diff +Patch42: ppc-use-local-plt.patch +Patch43: ppc-ensure-undef-dynamic-weak-undefined.patch Patch100: add-ulp-section.diff Patch90: cross-avr-nesc-as.patch Patch92: cross-avr-omit_section_dynsym.patch @@ -195,6 +197,8 @@ echo "make check will return with %{make_check_handling} in case of testsuite fa %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p1 %patch100 -p1 %if "%{TARGET}" == "avr" cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h diff --git a/ppc-ensure-undef-dynamic-weak-undefined.patch b/ppc-ensure-undef-dynamic-weak-undefined.patch new file mode 100644 index 0000000..4c77df2 --- /dev/null +++ b/ppc-ensure-undef-dynamic-weak-undefined.patch @@ -0,0 +1,62 @@ +From b293661219c36e72acb80502a86b51160bb88cfd Mon Sep 17 00:00:00 2001 +From: Alan Modra +Date: Mon, 3 May 2021 10:03:06 +0930 +Subject: [PATCH] PPC: ensure_undef_dynamic on weak undef only in plt + +It's slightly weird to have a call to a weak function not protected by +a test of that function being non-NULL, but the non-NULL test might be +covered by a test of another function. For example: + if (func1) + { + func1 (); + func2 (); + } +where func2 is known to exist if func1 exists. + + * elf32-ppc.c (allocate_dynrelocs): Call ensure_undef_dynamic for + weak undefined symols that only appear on PLT relocs. + * elf64-ppc.c (allocate_dynrelocs): Likewise. +--- + bfd/ChangeLog | 6 ++++++ + bfd/elf32-ppc.c | 9 +++++++-- + bfd/elf64-ppc.c | 3 +++ + 3 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c +index 830c9200b0c..ff618e460a4 100644 +--- a/bfd/elf32-ppc.c ++++ b/bfd/elf32-ppc.c +@@ -5296,9 +5296,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + for (ent = h->plt.plist; ent != NULL; ent = ent->next) + if (ent->plt.refcount > 0) + { +- asection *s = htab->elf.splt; +- bfd_boolean dyn = !use_local_plt (info, h); ++ asection *s; ++ bfd_boolean dyn; + ++ if (!ensure_undef_dynamic (info, h)) ++ return FALSE; ++ ++ dyn = !use_local_plt (info, h); ++ s = htab->elf.splt; + if (!dyn) + { + if (h->type == STT_GNU_IFUNC) +diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c +index ed72de27507..bc960bf8e9d 100644 +--- a/bfd/elf64-ppc.c ++++ b/bfd/elf64-ppc.c +@@ -9855,6 +9855,9 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + for (pent = h->plt.plist; pent != NULL; pent = pent->next) + if (pent->plt.refcount > 0) + { ++ if (!ensure_undef_dynamic (info, h)) ++ return FALSE; ++ + if (use_local_plt (info, h)) + { + if (h->type == STT_GNU_IFUNC) +-- +2.31.1 + diff --git a/ppc-use-local-plt.patch b/ppc-use-local-plt.patch new file mode 100644 index 0000000..3a7fcc5 --- /dev/null +++ b/ppc-use-local-plt.patch @@ -0,0 +1,345 @@ +From 30845f113a3b01640c46f9b07549b080cb83bc81 Mon Sep 17 00:00:00 2001 +From: Alan Modra +Date: Tue, 19 Jan 2021 19:26:11 +1030 +Subject: [PATCH] PowerPC use_local_plt + +Put the logic to select local vs. usual .plt section in one place. + + * elf64-ppc.c (elf_hash_entry): New inline function. Use + throughout to replace casts. + (branch_reloc_hash_match): Remove const from params. + (use_local_plt): New function. + (allocate_dynrelocs, ppc_build_one_stub, ppc_size_one_stub), + (build_global_entry_stubs_and_plt, ppc64_elf_relocate_section): + Use use_local_plt. + * elf32-ppc.c (use_local_plt): New function. + (allocate_dynrelocs, ppc_elf_relocate_section), + (write_global_sym_plt): Use use_local_plt. +--- + bfd/ChangeLog | 13 +++++++++ + bfd/elf32-ppc.c | 48 +++++++++++++++--------------- + bfd/elf64-ppc.c | 77 ++++++++++++++++++++++++++----------------------- + 3 files changed, 78 insertions(+), 60 deletions(-) + +diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c +index fd88f3d718e..a8da3049986 100644 +--- a/bfd/elf32-ppc.c ++++ b/bfd/elf32-ppc.c +@@ -5094,6 +5094,18 @@ ensure_undef_dynamic (struct bfd_link_info *info, + return TRUE; + } + ++/* Choose whether to use htab->iplt or htab->pltlocal rather than the ++ usual htab->elf.splt section for a PLT entry. */ ++ ++static inline ++bfd_boolean use_local_plt (struct bfd_link_info *info, ++ struct elf_link_hash_entry *h) ++{ ++ return (h == NULL ++ || h->dynindx == -1 ++ || !elf_hash_table (info)->dynamic_sections_created); ++} ++ + /* Allocate space in associated reloc sections for dynamic relocs. */ + + static bfd_boolean +@@ -5103,7 +5115,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + struct ppc_elf_link_hash_entry *eh; + struct ppc_elf_link_hash_table *htab; + struct elf_dyn_relocs *p; +- bfd_boolean dyn; + + if (h->root.type == bfd_link_hash_indirect) + return TRUE; +@@ -5271,8 +5282,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + b) is an ifunc, or + c) has plt16 relocs and has been processed by adjust_dynamic_symbol, or + d) has plt16 relocs and we are linking statically. */ +- dyn = htab->elf.dynamic_sections_created && h->dynindx != -1; +- if (dyn ++ if ((htab->elf.dynamic_sections_created && h->dynindx != -1) + || h->type == STT_GNU_IFUNC + || (h->needs_plt && h->dynamic_adjusted) + || (h->needs_plt +@@ -5290,6 +5300,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + if (ent->plt.refcount > 0) + { + asection *s = htab->elf.splt; ++ bfd_boolean dyn = !use_local_plt (info, h); + + if (!dyn) + { +@@ -8373,9 +8384,7 @@ ppc_elf_relocate_section (bfd *output_bfd, + + unresolved_reloc = FALSE; + plt = htab->elf.splt; +- if (!htab->elf.dynamic_sections_created +- || h == NULL +- || h->dynindx == -1) ++ if (use_local_plt (info, h)) + { + if (ifunc != NULL) + plt = htab->elf.iplt; +@@ -9351,6 +9360,8 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) + for (ent = h->plt.plist; ent != NULL; ent = ent->next) + if (ent->plt.offset != (bfd_vma) -1) + { ++ bfd_boolean dyn = !use_local_plt (info, h); ++ + if (!doneone) + { + Elf_Internal_Rela rela; +@@ -9359,9 +9370,7 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) + asection *plt = htab->elf.splt; + asection *relplt = htab->elf.srelplt; + +- if (htab->plt_type == PLT_NEW +- || !htab->elf.dynamic_sections_created +- || h->dynindx == -1) ++ if (htab->plt_type == PLT_NEW || !dyn) + reloc_index = ent->plt.offset / 4; + else + { +@@ -9374,9 +9383,7 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) + + /* This symbol has an entry in the procedure linkage table. + Set it up. */ +- if (htab->plt_type == PLT_VXWORKS +- && htab->elf.dynamic_sections_created +- && h->dynindx != -1) ++ if (htab->plt_type == PLT_VXWORKS && dyn) + { + bfd_vma got_offset; + const bfd_vma *plt_entry; +@@ -9499,8 +9506,7 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) + else + { + rela.r_addend = 0; +- if (!htab->elf.dynamic_sections_created +- || h->dynindx == -1) ++ if (!dyn) + { + if (h->type == STT_GNU_IFUNC) + { +@@ -9529,9 +9535,7 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) + + plt->output_offset + + ent->plt.offset); + +- if (htab->plt_type == PLT_OLD +- || !htab->elf.dynamic_sections_created +- || h->dynindx == -1) ++ if (htab->plt_type == PLT_OLD || !dyn) + { + /* We don't need to fill in the .plt. The ppc dynamic + linker will fill it in. */ +@@ -9550,8 +9554,7 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) + if (relplt != NULL) + { + /* Fill in the entry in the .rela.plt section. */ +- if (!htab->elf.dynamic_sections_created +- || h->dynindx == -1) ++ if (!dyn) + { + if (h->type == STT_GNU_IFUNC) + rela.r_info = ELF32_R_INFO (0, R_PPC_IRELATIVE); +@@ -9574,15 +9577,12 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) + doneone = TRUE; + } + +- if (htab->plt_type == PLT_NEW +- || !htab->elf.dynamic_sections_created +- || h->dynindx == -1) ++ if (htab->plt_type == PLT_NEW || !dyn) + { + unsigned char *p; + asection *plt = htab->elf.splt; + +- if (!htab->elf.dynamic_sections_created +- || h->dynindx == -1) ++ if (!dyn) + { + if (h->type == STT_GNU_IFUNC) + plt = htab->elf.iplt; +diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c +index a118c32c797..ed595074b94 100644 +--- a/bfd/elf64-ppc.c ++++ b/bfd/elf64-ppc.c +@@ -3149,6 +3149,12 @@ ppc_elf_hash_entry (struct elf_link_hash_entry *ent) + return (struct ppc_link_hash_entry *) ent; + } + ++static inline struct elf_link_hash_entry * ++elf_hash_entry (struct ppc_link_hash_entry *ent) ++{ ++ return (struct elf_link_hash_entry *) ent; ++} ++ + /* ppc64 ELF linker hash table. */ + + struct ppc_link_hash_table +@@ -5656,10 +5662,10 @@ static bfd_boolean + is_tls_get_addr (struct elf_link_hash_entry *h, + struct ppc_link_hash_table *htab) + { +- return (h == (struct elf_link_hash_entry *) htab->tls_get_addr_fd +- || h == (struct elf_link_hash_entry *) htab->tga_desc_fd +- || h == (struct elf_link_hash_entry *) htab->tls_get_addr +- || h == (struct elf_link_hash_entry *) htab->tga_desc); ++ return (h == elf_hash_entry (htab->tls_get_addr_fd) ++ || h == elf_hash_entry (htab->tga_desc_fd) ++ || h == elf_hash_entry (htab->tls_get_addr) ++ || h == elf_hash_entry (htab->tga_desc)); + } + + static bfd_boolean func_desc_adjust (struct elf_link_hash_entry *, void *); +@@ -7856,7 +7862,7 @@ ppc64_elf_tls_setup (struct bfd_link_info *info) + if (tga_fd != NULL) + { + htab->tls_get_addr_fd = ppc_elf_hash_entry (opt_fd); +- tga = (struct elf_link_hash_entry *) htab->tls_get_addr; ++ tga = elf_hash_entry (htab->tls_get_addr); + if (opt != NULL && tga != NULL) + { + tga->root.type = bfd_link_hash_indirect; +@@ -7917,12 +7923,12 @@ ppc64_elf_tls_setup (struct bfd_link_info *info) + any of HASH1, HASH2, HASH3, or HASH4. */ + + static bfd_boolean +-branch_reloc_hash_match (const bfd *ibfd, +- const Elf_Internal_Rela *rel, +- const struct ppc_link_hash_entry *hash1, +- const struct ppc_link_hash_entry *hash2, +- const struct ppc_link_hash_entry *hash3, +- const struct ppc_link_hash_entry *hash4) ++branch_reloc_hash_match (bfd *ibfd, ++ Elf_Internal_Rela *rel, ++ struct ppc_link_hash_entry *hash1, ++ struct ppc_link_hash_entry *hash2, ++ struct ppc_link_hash_entry *hash3, ++ struct ppc_link_hash_entry *hash4) + { + Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (ibfd); + enum elf_ppc64_reloc_type r_type = ELF64_R_TYPE (rel->r_info); +@@ -7935,10 +7941,10 @@ branch_reloc_hash_match (const bfd *ibfd, + + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + h = elf_follow_link (h); +- if (h == (struct elf_link_hash_entry *) hash1 +- || h == (struct elf_link_hash_entry *) hash2 +- || h == (struct elf_link_hash_entry *) hash3 +- || h == (struct elf_link_hash_entry *) hash4) ++ if (h == elf_hash_entry (hash1) ++ || h == elf_hash_entry (hash2) ++ || h == elf_hash_entry (hash3) ++ || h == elf_hash_entry (hash4)) + return TRUE; + } + return FALSE; +@@ -9629,6 +9635,18 @@ ensure_undef_dynamic (struct bfd_link_info *info, + return TRUE; + } + ++/* Choose whether to use htab->iplt or htab->pltlocal rather than the ++ usual htab->elf.splt section for a PLT entry. */ ++ ++static inline ++bfd_boolean use_local_plt (struct bfd_link_info *info, ++ struct elf_link_hash_entry *h) ++{ ++ return (h == NULL ++ || h->dynindx == -1 ++ || !elf_hash_table (info)->dynamic_sections_created); ++} ++ + /* Allocate space in .plt, .got and associated reloc sections for + dynamic relocs. */ + +@@ -9818,8 +9836,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) + for (pent = h->plt.plist; pent != NULL; pent = pent->next) + if (pent->plt.refcount > 0) + { +- if (!htab->elf.dynamic_sections_created +- || h->dynindx == -1) ++ if (use_local_plt (info, h)) + { + if (h->type == STT_GNU_IFUNC) + { +@@ -11703,9 +11720,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) + abort (); + + plt = htab->elf.splt; +- if (!htab->elf.dynamic_sections_created +- || stub_entry->h == NULL +- || stub_entry->h->elf.dynindx == -1) ++ if (use_local_plt (info, elf_hash_entry (stub_entry->h))) + { + if (stub_entry->symtype == STT_GNU_IFUNC) + plt = htab->elf.iplt; +@@ -11837,9 +11852,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) + abort (); + + plt = htab->elf.splt; +- if (!htab->elf.dynamic_sections_created +- || stub_entry->h == NULL +- || stub_entry->h->elf.dynindx == -1) ++ if (use_local_plt (info, elf_hash_entry (stub_entry->h))) + { + if (stub_entry->symtype == STT_GNU_IFUNC) + plt = htab->elf.iplt; +@@ -12208,9 +12221,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) + abort (); + + plt = htab->elf.splt; +- if (!htab->elf.dynamic_sections_created +- || stub_entry->h == NULL +- || stub_entry->h->elf.dynindx == -1) ++ if (use_local_plt (info, elf_hash_entry (stub_entry->h))) + { + if (stub_entry->symtype == STT_GNU_IFUNC) + plt = htab->elf.iplt; +@@ -12292,9 +12303,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) + if (targ >= (bfd_vma) -2) + abort (); + plt = htab->elf.splt; +- if (!htab->elf.dynamic_sections_created +- || stub_entry->h == NULL +- || stub_entry->h->elf.dynindx == -1) ++ if (use_local_plt (info, elf_hash_entry (stub_entry->h))) + { + if (stub_entry->symtype == STT_GNU_IFUNC) + plt = htab->elf.iplt; +@@ -14061,8 +14070,7 @@ build_global_entry_stubs_and_plt (struct elf_link_hash_entry *h, void *inf) + asection *plt, *relplt; + bfd_byte *loc; + +- if (!htab->elf.dynamic_sections_created +- || h->dynindx == -1) ++ if (use_local_plt (info, h)) + { + if (!(h->def_regular + && (h->root.type == bfd_link_hash_defined +@@ -14151,8 +14159,7 @@ build_global_entry_stubs_and_plt (struct elf_link_hash_entry *h, void *inf) + + p = s->contents + h->root.u.def.value; + plt = htab->elf.splt; +- if (!htab->elf.dynamic_sections_created +- || h->dynindx == -1) ++ if (use_local_plt (info, h)) + { + if (h->type == STT_GNU_IFUNC) + plt = htab->elf.iplt; +@@ -16490,9 +16497,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, + bfd_vma got; + + plt = htab->elf.splt; +- if (!htab->elf.dynamic_sections_created +- || h == NULL +- || h->elf.dynindx == -1) ++ if (use_local_plt (info, elf_hash_entry (h))) + { + if (h != NULL + ? h->elf.type == STT_GNU_IFUNC +-- +2.31.1 +