Compare commits
No commits in common. "c9-beta" and "c10s" have entirely different histories.
@ -1 +0,0 @@
|
||||
fee4fbef9d632afc1988dd631d7f75d4394b7f8d SOURCES/binutils-2.40.tar.xz
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
||||
SOURCES/binutils-2.40.tar.xz
|
3
README.md
Normal file
3
README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Package Not Available
|
||||
This package is not available on CentOS Stream 10.
|
||||
It may be available on another branch.
|
@ -1,38 +0,0 @@
|
||||
# Generate OUTPUT_FORMAT line for .so files from the system linker output.
|
||||
# Imported from glibc/Makerules.
|
||||
|
||||
/ld.*[ ]-E[BL]/b f
|
||||
/collect.*[ ]-E[BL]/b f
|
||||
/OUTPUT_FORMAT[^)]*$/{N
|
||||
s/\n[ ]*/ /
|
||||
}
|
||||
t o
|
||||
: o
|
||||
s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/
|
||||
t q
|
||||
s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\1,\2,\3/
|
||||
t s
|
||||
s/^.*OUTPUT_FORMAT(\([^,)]*\).*$)/OUTPUT_FORMAT(\1)/
|
||||
t q
|
||||
d
|
||||
: s
|
||||
s/"//g
|
||||
G
|
||||
s/\n//
|
||||
s/^\([^,]*\),\([^,]*\),\([^,]*\),B/OUTPUT_FORMAT(\2)/p
|
||||
s/^\([^,]*\),\([^,]*\),\([^,]*\),L/OUTPUT_FORMAT(\3)/p
|
||||
s/^\([^,]*\),\([^,]*\),\([^,]*\)/OUTPUT_FORMAT(\1)/p
|
||||
/,/s|^|*** BUG in libc/scripts/output-format.sed *** |p
|
||||
q
|
||||
: q
|
||||
s/"//g
|
||||
p
|
||||
q
|
||||
: f
|
||||
s/^.*[ ]-E\([BL]\)[ ].*$/,\1/
|
||||
t h
|
||||
s/^.*[ ]-E\([BL]\)$/,\1/
|
||||
t h
|
||||
d
|
||||
: h
|
||||
h
|
@ -1,11 +0,0 @@
|
||||
diff -rup binutils.orig/bfd/elfnn-aarch64.c binutils-2.27/bfd/elfnn-aarch64.c
|
||||
--- binutils.orig/bfd/elfnn-aarch64.c 2017-02-21 10:45:19.311956006 +0000
|
||||
+++ binutils-2.27/bfd/elfnn-aarch64.c 2017-02-21 11:55:07.517922655 +0000
|
||||
@@ -4947,6 +4947,7 @@ elfNN_aarch64_final_link_relocate (reloc
|
||||
it here if it is defined in a non-shared object. */
|
||||
if (h != NULL
|
||||
&& h->type == STT_GNU_IFUNC
|
||||
+ && (input_section->flags & SEC_ALLOC)
|
||||
&& h->def_regular)
|
||||
{
|
||||
asection *plt;
|
@ -1,176 +0,0 @@
|
||||
diff -rupN binutils.orig/gas/config/tc-i386.c binutils-2.40/gas/config/tc-i386.c
|
||||
--- binutils.orig/gas/config/tc-i386.c 2024-02-13 16:41:10.787729089 +0000
|
||||
+++ binutils-2.40/gas/config/tc-i386.c 2024-02-13 16:52:35.402669140 +0000
|
||||
@@ -998,6 +998,7 @@ static const arch_entry cpu_arch[] =
|
||||
ARCH (znver2, ZNVER, ZNVER2, false),
|
||||
ARCH (znver3, ZNVER, ZNVER3, false),
|
||||
ARCH (znver4, ZNVER, ZNVER4, false),
|
||||
+ ARCH (znver5, ZNVER, ZNVER5, false),
|
||||
ARCH (btver1, BT, BTVER1, false),
|
||||
ARCH (btver2, BT, BTVER2, false),
|
||||
|
||||
diff -rupN binutils.orig/gas/doc/c-i386.texi binutils-2.40/gas/doc/c-i386.texi
|
||||
--- binutils.orig/gas/doc/c-i386.texi 2024-02-13 16:41:10.789729089 +0000
|
||||
+++ binutils-2.40/gas/doc/c-i386.texi 2024-02-13 16:52:35.572669132 +0000
|
||||
@@ -125,6 +125,7 @@ processor names are recognized:
|
||||
@code{znver2},
|
||||
@code{znver3},
|
||||
@code{znver4},
|
||||
+@code{znver5},
|
||||
@code{btver1},
|
||||
@code{btver2},
|
||||
@code{generic32} and
|
||||
@@ -1477,7 +1478,8 @@ supported on the CPU specified. The cho
|
||||
@item @samp{k6} @tab @samp{k6_2} @tab @samp{athlon} @tab @samp{k8}
|
||||
@item @samp{amdfam10} @tab @samp{bdver1} @tab @samp{bdver2} @tab @samp{bdver3}
|
||||
@item @samp{bdver4} @tab @samp{znver1} @tab @samp{znver2} @tab @samp{znver3}
|
||||
-@item @samp{znver4} @tab @samp{btver1} @tab @samp{btver2} @tab @samp{generic32}
|
||||
+@item @samp{znver4} @tab @samp{znver5} @tab @samp{btver1} @tab @samp{btver2}
|
||||
+@item @samp{generic32}
|
||||
@item @samp{generic64} @tab @samp{.cmov} @tab @samp{.fxsr} @tab @samp{.mmx}
|
||||
@item @samp{.sse} @tab @samp{.sse2} @tab @samp{.sse3} @tab @samp{.sse4a}
|
||||
@item @samp{.ssse3} @tab @samp{.sse4.1} @tab @samp{.sse4.2} @tab @samp{.sse4}
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/arch-15-znver5.d binutils-2.40/gas/testsuite/gas/i386/arch-15-znver5.d
|
||||
--- binutils.orig/gas/testsuite/gas/i386/arch-15-znver5.d 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/arch-15-znver5.d 2024-02-13 16:52:35.405669140 +0000
|
||||
@@ -0,0 +1,5 @@
|
||||
+#source: arch-15.s
|
||||
+#as: -march=znver5
|
||||
+#objdump: -dw
|
||||
+#name: i386 arch 15 (znver5)
|
||||
+#dump: arch-15.d
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/arch-15.d binutils-2.40/gas/testsuite/gas/i386/arch-15.d
|
||||
--- binutils.orig/gas/testsuite/gas/i386/arch-15.d 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/arch-15.d 2024-02-13 16:52:35.405669140 +0000
|
||||
@@ -0,0 +1,13 @@
|
||||
+#objdump: -dw
|
||||
+#name: i386 arch 15
|
||||
+
|
||||
+.*: file format .*
|
||||
+
|
||||
+Disassembly of section .text:
|
||||
+
|
||||
+0+ <.text>:
|
||||
+[ ]*[a-f0-9]+:[ ]*c4 e2 59 50 d2[ ]*\{vex\} vpdpbusd %xmm2,%xmm4,%xmm2
|
||||
+[ ]*[a-f0-9]+:[ ]*0f 38 f9 01[ ]*movdiri %eax,\(%ecx\)
|
||||
+[ ]*[a-f0-9]+:[ ]*66 0f 38 f8 01[ ]*movdir64b \(%ecx\),%eax
|
||||
+[ ]*[a-f0-9]+:[ ]*62 f2 6f 48 68 d9[ ]*vp2intersectd %zmm1,%zmm2,%k3
|
||||
+#pass
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/arch-15.s binutils-2.40/gas/testsuite/gas/i386/arch-15.s
|
||||
--- binutils.orig/gas/testsuite/gas/i386/arch-15.s 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/arch-15.s 2024-02-13 16:52:35.405669140 +0000
|
||||
@@ -0,0 +1,7 @@
|
||||
+# Test -march=
|
||||
+ .text
|
||||
+
|
||||
+ {vex} vpdpbusd %xmm2, %xmm4, %xmm2 #AVX_VNNI
|
||||
+ movdiri %eax, (%ecx) #MOVDIRI
|
||||
+ movdir64b (%ecx), %eax #MOVDIR64B
|
||||
+ vp2intersectd %zmm1, %zmm2, %k3 #AVX512_VP2INTERSECT
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/i386.exp binutils-2.40/gas/testsuite/gas/i386/i386.exp
|
||||
--- binutils.orig/gas/testsuite/gas/i386/i386.exp 2024-02-13 16:41:10.859729082 +0000
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/i386.exp 2024-02-13 16:52:35.405669140 +0000
|
||||
@@ -199,6 +199,7 @@ if [gas_32_check] then {
|
||||
run_dump_test "arch-13-znver2"
|
||||
run_dump_test "arch-14-znver3"
|
||||
run_dump_test "arch-14-znver4"
|
||||
+ run_dump_test "arch-15-znver5"
|
||||
run_dump_test "arch-10-btver1"
|
||||
run_dump_test "arch-10-btver2"
|
||||
run_list_test "arch-10-1" "-march=generic32 -I${srcdir}/$subdir -al"
|
||||
@@ -211,6 +212,7 @@ if [gas_32_check] then {
|
||||
run_dump_test "arch-13"
|
||||
run_dump_test "arch-14"
|
||||
run_dump_test "arch-14-1"
|
||||
+ run_dump_test "arch-15"
|
||||
run_list_test "arch-dflt" "-march=generic32 -al"
|
||||
run_list_test "arch-stk" "-march=generic32 -al"
|
||||
run_dump_test "8087"
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-arch-5-znver5.d binutils-2.40/gas/testsuite/gas/i386/x86-64-arch-5-znver5.d
|
||||
--- binutils.orig/gas/testsuite/gas/i386/x86-64-arch-5-znver5.d 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/x86-64-arch-5-znver5.d 2024-02-13 16:52:35.406669140 +0000
|
||||
@@ -0,0 +1,5 @@
|
||||
+#source: x86-64-arch-5.s
|
||||
+#as: -march=znver5
|
||||
+#objdump: -dw
|
||||
+#name: x86-64 arch 5 (znver5)
|
||||
+#dump: x86-64-arch-5.d
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-arch-5.d binutils-2.40/gas/testsuite/gas/i386/x86-64-arch-5.d
|
||||
--- binutils.orig/gas/testsuite/gas/i386/x86-64-arch-5.d 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/x86-64-arch-5.d 2024-02-13 16:52:35.406669140 +0000
|
||||
@@ -0,0 +1,14 @@
|
||||
+#objdump: -dw
|
||||
+#name: x86-64 arch 5
|
||||
+
|
||||
+.*: file format .*
|
||||
+
|
||||
+Disassembly of section .text:
|
||||
+
|
||||
+0+ <.text>:
|
||||
+[ ]*[a-f0-9]+:[ ]*c4 c2 59 50 d4[ ]*\{vex\} vpdpbusd %xmm12,%xmm4,%xmm2
|
||||
+[ ]*[a-f0-9]+:[ ]*48 0f 38 f9 01[ ]*movdiri %rax,\(%rcx\)
|
||||
+[ ]*[a-f0-9]+:[ ]*66 0f 38 f8 01[ ]*movdir64b \(%rcx\),%rax
|
||||
+[ ]*[a-f0-9]+:[ ]*62 f2 6f 48 68 d9[ ]*vp2intersectd %zmm1,%zmm2,%k3
|
||||
+[ ]*[a-f0-9]+:[ ]*0f 18 3d 78 56 34 12[ ]*prefetchit0 0x12345678\(%rip\) # 0x[0-9a-f]+
|
||||
+#pass
|
||||
diff -rupN binutils.orig/gas/testsuite/gas/i386/x86-64-arch-5.s binutils-2.40/gas/testsuite/gas/i386/x86-64-arch-5.s
|
||||
--- binutils.orig/gas/testsuite/gas/i386/x86-64-arch-5.s 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/x86-64-arch-5.s 2024-02-13 16:52:35.406669140 +0000
|
||||
@@ -0,0 +1,8 @@
|
||||
+# Test -march=
|
||||
+ .text
|
||||
+
|
||||
+ {vex} vpdpbusd %xmm12, %xmm4, %xmm2 #AVX_VNNI
|
||||
+ movdiri %rax, (%rcx) #MOVDIRI
|
||||
+ movdir64b (%rcx), %rax #MOVDIR64B
|
||||
+ vp2intersectd %zmm1, %zmm2, %k3 #AVX512_VP2INTERSECT
|
||||
+ prefetchit0 0x12345678(%rip) #prefetchi
|
||||
diff -rupN binutils.orig/opcodes/i386-gen.c binutils-2.40/opcodes/i386-gen.c
|
||||
--- binutils.orig/opcodes/i386-gen.c 2024-02-13 16:41:11.145729056 +0000
|
||||
+++ binutils-2.40/opcodes/i386-gen.c 2024-02-13 16:52:35.406669140 +0000
|
||||
@@ -97,6 +97,8 @@ static const dependency isa_dependencies
|
||||
"ZNVER2|INVLPGB|TLBSYNC|VAES|VPCLMULQDQ|INVPCID|SNP|OSPKE" },
|
||||
{ "ZNVER4",
|
||||
"ZNVER3|AVX512F|AVX512DQ|AVX512IFMA|AVX512CD|AVX512BW|AVX512VL|AVX512_BF16|AVX512VBMI|AVX512_VBMI2|AVX512_VNNI|AVX512_BITALG|AVX512_VPOPCNTDQ|GFNI|RMPQUERY" },
|
||||
+ { "ZNVER5",
|
||||
+ "ZNVER4|AVX_VNNI|MOVDIRI|MOVDIR64B|AVX512_VP2INTERSECT|PREFETCHI" },
|
||||
{ "BTVER1",
|
||||
"GENERIC64|FISTTP|CX16|Rdtscp|SSSE3|SSE4A|ABM|PRFCHW|CX16|Clflush|FISTTP|SVME" },
|
||||
{ "BTVER2",
|
||||
diff -rupN binutils.orig/opcodes/i386-init.h binutils-2.40/opcodes/i386-init.h
|
||||
--- binutils.orig/opcodes/i386-init.h 2024-02-13 16:41:11.145729056 +0000
|
||||
+++ binutils-2.40/opcodes/i386-init.h 2024-02-13 17:32:50.339735343 +0000
|
||||
@@ -1431,6 +1431,15 @@
|
||||
1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, \
|
||||
0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0 } }
|
||||
|
||||
+#define CPU_ZNVER5_FLAGS \
|
||||
+ { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, \
|
||||
+ 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, \
|
||||
+ 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, \
|
||||
+ 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, \
|
||||
+ 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, \
|
||||
+ 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, \
|
||||
+ 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0 } }
|
||||
+
|
||||
#define CPU_BTVER1_FLAGS \
|
||||
{ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, \
|
||||
0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
|
||||
--- binutils.orig/gas/testsuite/gas/i386/i386.exp 2024-02-22 12:25:43.212505914 +0000
|
||||
+++ binutils-2.40/gas/testsuite/gas/i386/i386.exp 2024-02-22 12:28:26.254563823 +0000
|
||||
@@ -922,6 +922,7 @@ if [gas_64_check] then {
|
||||
run_dump_test "x86-64-arch-4"
|
||||
run_dump_test "x86-64-arch-4-1"
|
||||
run_dump_test "rmpquery"
|
||||
+ run_dump_test "x86-64-arch-5"
|
||||
run_dump_test "x86-64-arch-2-lzcnt"
|
||||
run_dump_test "x86-64-arch-2-prefetchw"
|
||||
run_dump_test "x86-64-arch-2-bdver1"
|
||||
@@ -932,6 +933,7 @@ if [gas_64_check] then {
|
||||
run_dump_test "x86-64-arch-3-znver2"
|
||||
run_dump_test "x86-64-arch-4-znver3"
|
||||
run_dump_test "x86-64-arch-4-znver4"
|
||||
+ run_dump_test "x86-64-arch-5-znver5"
|
||||
run_dump_test "x86-64-arch-2-btver1"
|
||||
run_dump_test "x86-64-arch-2-btver2"
|
||||
run_list_test "x86-64-arch-2-1" "-march=generic64 -I${srcdir}/$subdir -al"
|
@ -1,20 +0,0 @@
|
||||
--- binutils.orig/bfd/elf.c 2023-04-17 16:26:08.720347439 +0100
|
||||
+++ binutils-2.40/bfd/elf.c 2023-04-17 16:28:03.286317601 +0100
|
||||
@@ -9050,6 +9050,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return_verdef;
|
||||
}
|
||||
+ if (amt == 0)
|
||||
+ goto error_return_verdef;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return_verdef;
|
||||
@@ -9153,6 +9155,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd
|
||||
bfd_set_error (bfd_error_file_too_big);
|
||||
goto error_return;
|
||||
}
|
||||
+ if (amt == 0)
|
||||
+ goto error_return;
|
||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return;
|
@ -1,11 +0,0 @@
|
||||
--- binutils.orig/config/override.m4 2021-08-31 14:20:17.275574804 +0100
|
||||
+++ binutils-2.37/config/override.m4 2021-08-31 14:36:37.793954247 +0100
|
||||
@@ -41,7 +41,7 @@ dnl Or for updating the whole tree at on
|
||||
AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK],
|
||||
[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]),
|
||||
m4_defn([m4_PACKAGE_VERSION]), [],
|
||||
- [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])])
|
||||
+ [])
|
||||
])
|
||||
m4_define([AC_INIT], m4_defn([AC_INIT])[
|
||||
_GCC_AUTOCONF_VERSION_CHECK
|
@ -1,85 +0,0 @@
|
||||
diff -rup binutils.orig/configure binutils-2.40/configure
|
||||
--- binutils.orig/configure 2023-02-13 14:43:00.728877170 +0000
|
||||
+++ binutils-2.40/configure 2023-02-13 14:43:13.671864892 +0000
|
||||
@@ -5442,49 +5442,6 @@ if test -z "$LD"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
-# Check whether -static-libstdc++ -static-libgcc is supported.
|
||||
-have_static_libs=no
|
||||
-if test "$GCC" = yes; then
|
||||
- saved_LDFLAGS="$LDFLAGS"
|
||||
-
|
||||
- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether g++ accepts -static-libstdc++ -static-libgcc" >&5
|
||||
-$as_echo_n "checking whether g++ accepts -static-libstdc++ -static-libgcc... " >&6; }
|
||||
- ac_ext=cpp
|
||||
-ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
-
|
||||
-
|
||||
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-
|
||||
-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
|
||||
-#error -static-libstdc++ not implemented
|
||||
-#endif
|
||||
-int main() {}
|
||||
-_ACEOF
|
||||
-if ac_fn_cxx_try_link "$LINENO"; then :
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
-$as_echo "yes" >&6; }; have_static_libs=yes
|
||||
-else
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
-$as_echo "no" >&6; }
|
||||
-fi
|
||||
-rm -f core conftest.err conftest.$ac_objext \
|
||||
- conftest$ac_exeext conftest.$ac_ext
|
||||
- ac_ext=c
|
||||
-ac_cpp='$CPP $CPPFLAGS'
|
||||
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
-
|
||||
-
|
||||
- LDFLAGS="$saved_LDFLAGS"
|
||||
-fi
|
||||
-
|
||||
-
|
||||
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
diff -rup binutils.orig/configure.ac binutils-2.40/configure.ac
|
||||
--- binutils.orig/configure.ac 2023-02-13 14:43:00.728877170 +0000
|
||||
+++ binutils-2.40/configure.ac 2023-02-13 14:43:13.671864892 +0000
|
||||
@@ -1435,26 +1435,6 @@ if test -z "$LD"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
-# Check whether -static-libstdc++ -static-libgcc is supported.
|
||||
-have_static_libs=no
|
||||
-if test "$GCC" = yes; then
|
||||
- saved_LDFLAGS="$LDFLAGS"
|
||||
-
|
||||
- LDFLAGS="$LDFLAGS -static-libstdc++ -static-libgcc"
|
||||
- AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
|
||||
- AC_LANG_PUSH(C++)
|
||||
- AC_LINK_IFELSE([AC_LANG_SOURCE([
|
||||
-#if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
|
||||
-#error -static-libstdc++ not implemented
|
||||
-#endif
|
||||
-int main() {}])],
|
||||
- [AC_MSG_RESULT([yes]); have_static_libs=yes],
|
||||
- [AC_MSG_RESULT([no])])
|
||||
- AC_LANG_POP(C++)
|
||||
-
|
||||
- LDFLAGS="$saved_LDFLAGS"
|
||||
-fi
|
||||
-
|
||||
ACX_PROG_GNAT
|
||||
ACX_PROG_GDC
|
||||
ACX_PROG_CMP_IGNORE_INITIAL
|
||||
Only in binutils-2.40: configure.ac.orig
|
||||
Only in binutils-2.40: configure.orig
|
@ -1,33 +0,0 @@
|
||||
diff -rup binutils.orig/bfd/Makefile.am binutils-2.32/bfd/Makefile.am
|
||||
--- binutils.orig/bfd/Makefile.am 2019-02-08 12:22:51.395684251 +0000
|
||||
+++ binutils-2.32/bfd/Makefile.am 2019-02-08 12:22:53.970664973 +0000
|
||||
@@ -33,7 +33,7 @@ bfdlibdir = @bfdlibdir@
|
||||
bfdincludedir = @bfdincludedir@
|
||||
bfdlib_LTLIBRARIES = libbfd.la
|
||||
bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
- $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
|
||||
+ $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h
|
||||
else !INSTALL_LIBBFD
|
||||
# Empty these so that the respective installation directories will not be created.
|
||||
bfdlibdir =
|
||||
diff -rup binutils.orig/bfd/Makefile.in binutils-2.32/bfd/Makefile.in
|
||||
--- binutils.orig/bfd/Makefile.in 2019-02-08 12:21:35.291254044 +0000
|
||||
+++ binutils-2.32/bfd/Makefile.in 2019-02-08 12:22:10.163992947 +0000
|
||||
@@ -249,7 +249,7 @@ am__can_run_installinfo = \
|
||||
esac
|
||||
am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \
|
||||
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
- $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h
|
||||
+ $(INCDIR)/diagnostics.h $(INCDIR)/bfdlink.h $(INCDIR)/demangle.h
|
||||
HEADERS = $(bfdinclude_HEADERS)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
@@ -468,7 +468,7 @@ libbfd_la_LDFLAGS = $(am__append_1) -rel
|
||||
@INSTALL_LIBBFD_FALSE@bfdinclude_HEADERS = $(am__append_2)
|
||||
@INSTALL_LIBBFD_TRUE@bfdinclude_HEADERS = $(BFD_H) \
|
||||
@INSTALL_LIBBFD_TRUE@ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
|
||||
-@INSTALL_LIBBFD_TRUE@ $(INCDIR)/diagnostics.h \
|
||||
+@INSTALL_LIBBFD_TRUE@ $(INCDIR)/diagnostics.h $(INCDIR)/demangle.h \
|
||||
@INSTALL_LIBBFD_TRUE@ $(INCDIR)/bfdlink.h $(am__append_2)
|
||||
@INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@
|
||||
@INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la
|
@ -1,127 +0,0 @@
|
||||
diff -rup binutils.orig/binutils/readelf.c binutils-2.40/binutils/readelf.c
|
||||
--- binutils.orig/binutils/readelf.c 2023-02-13 14:38:44.081029276 +0000
|
||||
+++ binutils-2.40/binutils/readelf.c 2023-02-13 14:38:56.201022315 +0000
|
||||
@@ -22858,46 +22858,53 @@ process_file (char * file_name)
|
||||
Filedata * filedata = NULL;
|
||||
struct stat statbuf;
|
||||
char armag[SARMAG];
|
||||
- bool ret = true;
|
||||
+ bool ret = false;
|
||||
+ char * name;
|
||||
+ char * saved_program_name;
|
||||
+
|
||||
+ /* Overload program_name to include file_name. Doing this means
|
||||
+ that warning/error messages will positively identify the file
|
||||
+ concerned even when multiple instances of readelf are running. */
|
||||
+ name = xmalloc (strlen (program_name) + strlen (file_name) + 3);
|
||||
+ sprintf (name, "%s: %s", program_name, file_name);
|
||||
+ saved_program_name = program_name;
|
||||
+ program_name = name;
|
||||
|
||||
if (stat (file_name, &statbuf) < 0)
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
- error (_("'%s': No such file\n"), file_name);
|
||||
+ error (_("No such file\n"));
|
||||
else
|
||||
- error (_("Could not locate '%s'. System error message: %s\n"),
|
||||
- file_name, strerror (errno));
|
||||
- return false;
|
||||
+ error (_("Could not locate file. System error message: %s\n"),
|
||||
+ strerror (errno));
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
if (! S_ISREG (statbuf.st_mode))
|
||||
{
|
||||
- error (_("'%s' is not an ordinary file\n"), file_name);
|
||||
- return false;
|
||||
+ error (_("Not an ordinary file\n"));
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
filedata = calloc (1, sizeof * filedata);
|
||||
if (filedata == NULL)
|
||||
{
|
||||
error (_("Out of memory allocating file data structure\n"));
|
||||
- return false;
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
filedata->file_name = file_name;
|
||||
filedata->handle = fopen (file_name, "rb");
|
||||
if (filedata->handle == NULL)
|
||||
{
|
||||
- error (_("Input file '%s' is not readable.\n"), file_name);
|
||||
- free (filedata);
|
||||
- return false;
|
||||
+ error (_("Not readable\n"));
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
if (fread (armag, SARMAG, 1, filedata->handle) != 1)
|
||||
{
|
||||
- error (_("%s: Failed to read file's magic number\n"), file_name);
|
||||
- fclose (filedata->handle);
|
||||
- free (filedata);
|
||||
- return false;
|
||||
+ error (_("Failed to read file's magic number\n"));
|
||||
+ goto done;
|
||||
}
|
||||
|
||||
filedata->file_size = statbuf.st_size;
|
||||
@@ -22905,33 +22912,39 @@ process_file (char * file_name)
|
||||
|
||||
if (memcmp (armag, ARMAG, SARMAG) == 0)
|
||||
{
|
||||
- if (! process_archive (filedata, false))
|
||||
- ret = false;
|
||||
+ if (process_archive (filedata, false))
|
||||
+ ret = true;
|
||||
}
|
||||
else if (memcmp (armag, ARMAGT, SARMAG) == 0)
|
||||
{
|
||||
- if ( ! process_archive (filedata, true))
|
||||
- ret = false;
|
||||
+ if (process_archive (filedata, true))
|
||||
+ ret = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (do_archive_index && !check_all)
|
||||
- error (_("File %s is not an archive so its index cannot be displayed.\n"),
|
||||
- file_name);
|
||||
+ error (_("Not an archive so its index cannot be displayed.\n"));
|
||||
|
||||
rewind (filedata->handle);
|
||||
filedata->archive_file_size = filedata->archive_file_offset = 0;
|
||||
|
||||
- if (! process_object (filedata))
|
||||
- ret = false;
|
||||
+ if (process_object (filedata))
|
||||
+ ret = true;
|
||||
}
|
||||
|
||||
- fclose (filedata->handle);
|
||||
- free (filedata->section_headers);
|
||||
- free (filedata->program_headers);
|
||||
- free (filedata->string_table);
|
||||
- free (filedata->dump.dump_sects);
|
||||
- free (filedata);
|
||||
+ done:
|
||||
+ if (filedata)
|
||||
+ {
|
||||
+ if (filedata->handle != NULL)
|
||||
+ fclose (filedata->handle);
|
||||
+ free (filedata->section_headers);
|
||||
+ free (filedata->program_headers);
|
||||
+ free (filedata->string_table);
|
||||
+ free (filedata->dump.dump_sects);
|
||||
+ free (filedata);
|
||||
+ }
|
||||
+ free (program_name);
|
||||
+ program_name = saved_program_name;
|
||||
|
||||
free (ba_cache.strtab);
|
||||
ba_cache.strtab = NULL;
|
||||
Only in binutils-2.40/binutils: readelf.c.orig
|
@ -1,330 +0,0 @@
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 13:33:21.979627285 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 13:40:26.911199033 +0000
|
||||
@@ -34,5 +34,6 @@ hook called: claim_file tmpdir/libtext.a
|
||||
hook called: all symbols read.
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
|
||||
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-13.d binutils-2.32/ld/testsuite/ld-plugin/plugin-13.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-13.d 2019-02-15 13:33:21.980627277 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-13.d 2019-02-15 13:41:30.189692800 +0000
|
||||
@@ -23,5 +23,3 @@ hook called: claim_file tmpdir/main.o \[
|
||||
hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED
|
||||
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
|
||||
#...
|
||||
-.*main.c.*: undefined reference to `\.?func'
|
||||
-#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-14.d binutils-2.32/ld/testsuite/ld-plugin/plugin-14.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-14.d 2019-02-15 13:33:21.977627301 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-14.d 2019-02-15 13:42:03.598430960 +0000
|
||||
@@ -27,7 +27,6 @@ hook called: claim_file .*/ld/testsuite/
|
||||
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
|
||||
#...
|
||||
hook called: all symbols read.
|
||||
-.*: tmpdir/main.o: in function `main':
|
||||
-.*main.c.*: undefined reference to `\.?func'
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-15.d binutils-2.32/ld/testsuite/ld-plugin/plugin-15.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-15.d 2019-02-15 13:33:21.980627277 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-15.d 2019-02-15 13:42:28.014239600 +0000
|
||||
@@ -28,7 +28,6 @@ hook called: claim_file .*/ld/testsuite/
|
||||
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
|
||||
#...
|
||||
hook called: all symbols read.
|
||||
-.*: tmpdir/main.o: in function `main':
|
||||
-.*main.c.*: undefined reference to `\.?func'
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-16.d binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-16.d 2019-02-15 13:33:21.977627301 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d 2019-02-15 13:43:21.309821910 +0000
|
||||
@@ -30,9 +30,8 @@ hook called: claim_file .*/ld/testsuite/
|
||||
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
|
||||
#...
|
||||
hook called: all symbols read.
|
||||
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
|
||||
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
-.*: tmpdir/main.o: in function `main':
|
||||
-.*main.c.*: undefined reference to `\.?func'
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-17.d binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-17.d 2019-02-15 13:33:21.977627301 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d 2019-02-15 13:43:54.925558451 +0000
|
||||
@@ -31,7 +31,8 @@ hook called: claim_file .*/ld/testsuite/
|
||||
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
|
||||
#...
|
||||
hook called: all symbols read.
|
||||
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
|
||||
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-20.d binutils-2.32/ld/testsuite/ld-plugin/plugin-20.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-20.d 2019-02-15 13:33:21.980627277 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-20.d 2019-02-15 13:49:20.091010016 +0000
|
||||
@@ -2,6 +2,5 @@ hook called: all symbols read.
|
||||
Input: func.c \(tmpdir/libfunc.a\)
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
|
||||
-.*: tmpdir/main.o: in function `main':
|
||||
-.*main.c.*: undefined reference to `\.?func'
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-21.d binutils-2.32/ld/testsuite/ld-plugin/plugin-21.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-21.d 2019-02-15 13:33:21.978627293 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-21.d 2019-02-15 13:49:34.506897033 +0000
|
||||
@@ -2,6 +2,5 @@ hook called: all symbols read.
|
||||
Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\)
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
|
||||
-.*: tmpdir/main.o: in function `main':
|
||||
-.*main.c.*: undefined reference to `\.?func'
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-22.d binutils-2.32/ld/testsuite/ld-plugin/plugin-22.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-22.d 2019-02-15 13:33:21.980627277 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-22.d 2019-02-15 13:50:00.409694022 +0000
|
||||
@@ -2,6 +2,5 @@ Claimed: tmpdir/libfunc.a \[@.*
|
||||
hook called: all symbols read.
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
|
||||
-.*: tmpdir/main.o: in function `main':
|
||||
-.*main.c.*: undefined reference to `\.?func'
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-23.d binutils-2.32/ld/testsuite/ld-plugin/plugin-23.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-23.d 2019-02-15 13:33:21.979627285 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-23.d 2019-02-15 13:50:14.938580156 +0000
|
||||
@@ -2,6 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func.
|
||||
hook called: all symbols read.
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
|
||||
-.*: tmpdir/main.o: in function `main':
|
||||
-.*main.c.*: undefined reference to `\.?func'
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-24.d binutils-2.32/ld/testsuite/ld-plugin/plugin-24.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-24.d 2019-02-15 13:33:21.980627277 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-24.d 2019-02-15 13:49:46.346804240 +0000
|
||||
@@ -2,4 +2,5 @@ hook called: all symbols read.
|
||||
Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\)
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-25.d binutils-2.32/ld/testsuite/ld-plugin/plugin-25.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-25.d 2019-02-15 13:33:21.978627293 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-25.d 2019-02-15 13:50:29.322467422 +0000
|
||||
@@ -2,4 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func.
|
||||
hook called: all symbols read.
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.*
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 13:33:21.977627301 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 13:45:05.343006557 +0000
|
||||
@@ -1 +1,3 @@
|
||||
.*: error: Error
|
||||
+#...
|
||||
+
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-29.d binutils-2.32/ld/testsuite/ld-plugin/plugin-29.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-29.d 2019-02-15 13:33:21.978627293 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-29.d 2019-02-15 13:45:22.764870016 +0000
|
||||
@@ -1 +1,2 @@
|
||||
.*: warning: Warning
|
||||
+#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-30.d binutils-2.32/ld/testsuite/ld-plugin/plugin-30.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-30.d 2019-02-15 13:33:21.976627309 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-30.d 2019-02-15 13:48:57.067190464 +0000
|
||||
@@ -24,3 +24,4 @@ hook called: claim_file tmpdir/main.o \[
|
||||
hook called: claim_file tmpdir/func.o \[@0/.* not claimed
|
||||
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
|
||||
hook called: claim_file tmpdir/libempty.a \[@.* not claimed
|
||||
+#pass
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-6.d binutils-2.32/ld/testsuite/ld-plugin/plugin-6.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-6.d 2019-02-15 13:33:21.979627285 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-6.d 2019-02-15 13:37:14.672749977 +0000
|
||||
@@ -27,7 +27,6 @@ hook called: claim_file tmpdir/func.o \[
|
||||
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
|
||||
#...
|
||||
hook called: all symbols read.
|
||||
-.*: tmpdir/main.o: in function `main':
|
||||
-.*main.c.*: undefined reference to `\.?func'
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-7.d binutils-2.32/ld/testsuite/ld-plugin/plugin-7.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-7.d 2019-02-15 13:33:21.977627301 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-7.d 2019-02-15 13:37:58.000400421 +0000
|
||||
@@ -28,7 +28,6 @@ hook called: claim_file tmpdir/func.o \[
|
||||
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
|
||||
#...
|
||||
hook called: all symbols read.
|
||||
-.*: tmpdir/main.o: in function `main':
|
||||
-.*main.c.*: undefined reference to `\.?func'
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 13:33:21.980627277 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 13:38:34.096109209 +0000
|
||||
@@ -32,7 +32,6 @@ hook called: claim_file tmpdir/text.o \[
|
||||
hook called: all symbols read.
|
||||
Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
|
||||
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
-.*: tmpdir/main.o: in function `main':
|
||||
-.*main.c.*: undefined reference to `\.?func'
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-9.d binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-9.d 2019-02-15 13:33:21.977627301 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d 2019-02-15 13:39:52.655475403 +0000
|
||||
@@ -31,7 +31,8 @@ hook called: claim_file tmpdir/func.o \[
|
||||
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
|
||||
#...
|
||||
hook called: all symbols read.
|
||||
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
|
||||
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/pr20070.d binutils-2.32/ld/testsuite/ld-plugin/pr20070.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/pr20070.d 2019-02-15 13:33:21.976627309 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/pr20070.d 2019-02-15 13:50:56.874251486 +0000
|
||||
@@ -5,5 +5,6 @@ Sym: 'weakdef' Resolution: LDPR_PREVAILI
|
||||
Sym: 'undef' Resolution: LDPR_UNDEF
|
||||
Sym: 'weakundef' Resolution: LDPR_UNDEF
|
||||
Sym: 'common' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-srec/srec.exp binutils-2.32/ld/testsuite/ld-srec/srec.exp
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-srec/srec.exp 2019-02-15 13:33:21.938627615 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-srec/srec.exp 2019-02-15 13:53:58.744814006 +0000
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
# Get the offset from an S-record line to the start of the data.
|
||||
|
||||
+return
|
||||
+
|
||||
proc srec_off { l } {
|
||||
if [string match "S1*" $l] {
|
||||
return 8
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:10:59.038709514 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:13:53.532300721 +0000
|
||||
@@ -32,7 +32,7 @@ hook called: claim_file tmpdir/func.o \[
|
||||
hook called: claim_file tmpdir/libtext.a \[@.* not claimed
|
||||
#...
|
||||
hook called: all symbols read.
|
||||
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
|
||||
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
#...
|
||||
hook called: cleanup.
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-11.d binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-11.d 2019-02-15 14:10:59.041709490 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d 2019-02-15 14:14:50.061844322 +0000
|
||||
@@ -35,8 +35,9 @@ hook called: claim_file tmpdir/func.o \[
|
||||
hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED
|
||||
#...
|
||||
hook called: all symbols read.
|
||||
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
|
||||
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF
|
||||
+Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-18.d binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-18.d 2019-02-15 14:10:58.942710289 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d 2019-02-15 14:15:20.030602369 +0000
|
||||
@@ -32,7 +32,8 @@ hook called: claim_file .*/ld/testsuite/
|
||||
hook called: claim_file tmpdir/libtext.a \[@.* not claimed
|
||||
#...
|
||||
hook called: all symbols read.
|
||||
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
|
||||
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-19.d binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-19.d 2019-02-15 14:10:59.024709627 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d 2019-02-15 14:15:54.926320633 +0000
|
||||
@@ -35,8 +35,9 @@ hook called: claim_file .*/ld/testsuite/
|
||||
hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED
|
||||
#...
|
||||
hook called: all symbols read.
|
||||
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
|
||||
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
-Sym: '_?text' Resolution: LDPR_PREVAILING_DEF
|
||||
+Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
+#...
|
||||
hook called: cleanup.
|
||||
#...
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 14:10:58.998709837 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 14:12:19.856057024 +0000
|
||||
@@ -1,3 +1,2 @@
|
||||
.*: error: Error
|
||||
#...
|
||||
-
|
||||
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d
|
||||
--- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 14:10:59.074709224 +0000
|
||||
+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 14:11:48.144313048 +0000
|
||||
@@ -30,7 +30,7 @@ hook called: claim_file tmpdir/func.o \[
|
||||
hook called: claim_file tmpdir/text.o \[@0/.* not claimed
|
||||
#...
|
||||
hook called: all symbols read.
|
||||
-Sym: '_?func' Resolution: LDPR_PREVAILING_DEF
|
||||
+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
|
||||
#...
|
||||
hook called: cleanup.
|
||||
diff -rup binutils.orig/ld/testsuite/ld-elfvers/vers24.rd binutils-2.30/ld/testsuite/ld-elfvers/vers24.rd
|
||||
--- binutils.orig/ld/testsuite/ld-elfvers/vers24.rd 2018-09-05 09:45:44.013108697 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-elfvers/vers24.rd 2018-09-05 12:06:17.287425232 +0100
|
||||
@@ -7,9 +7,9 @@ Symbol table '.dynsym' contains [0-9]+ e
|
||||
# And ensure the dynamic symbol table contains at least x@VERS.0
|
||||
# and foo@@VERS.0 symbols
|
||||
#...
|
||||
- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0
|
||||
+ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0.*
|
||||
#...
|
||||
- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0
|
||||
+ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0.*
|
||||
#...
|
||||
Symbol table '.symtab' contains [0-9]+ entries:
|
||||
#pass
|
||||
diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin.exp binutils-2.30/ld/testsuite/ld-plugin/plugin.exp
|
||||
--- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2018-09-05 09:45:44.023108605 +0100
|
||||
+++ binutils-2.30/ld/testsuite/ld-plugin/plugin.exp 2018-09-05 11:18:53.997202105 +0100
|
||||
@@ -118,6 +118,12 @@ if { $can_compile && !$failed_compile }
|
||||
}
|
||||
}
|
||||
|
||||
+# I do not know why, but the underscore prefix test is going
|
||||
+# wrong on ppc64le targets. So override it here.
|
||||
+if { [istarget powerpc*-*-linux*] || [istarget x86_64*-*-linux*] } {
|
||||
+ set _ ""
|
||||
+}
|
||||
+
|
||||
set testobjfiles "tmpdir/main.o tmpdir/func.o tmpdir/text.o"
|
||||
set testobjfiles_notext "tmpdir/main.o tmpdir/func.o"
|
||||
set testsrcfiles "tmpdir/main.o $srcdir/$subdir/func.c tmpdir/text.o"
|
@ -1,193 +0,0 @@
|
||||
diff --git a/gold/i386.cc b/gold/i386.cc
|
||||
index bf209fe9a86..31161ff091c 100644
|
||||
--- a/gold/i386.cc
|
||||
+++ b/gold/i386.cc
|
||||
@@ -360,7 +360,11 @@ class Target_i386 : public Sized_target<32, false>
|
||||
got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL),
|
||||
got_tlsdesc_(NULL), global_offset_table_(NULL), rel_dyn_(NULL),
|
||||
rel_irelative_(NULL), copy_relocs_(elfcpp::R_386_COPY),
|
||||
- got_mod_index_offset_(-1U), tls_base_symbol_defined_(false)
|
||||
+ got_mod_index_offset_(-1U), tls_base_symbol_defined_(false),
|
||||
+ isa_1_used_(0), isa_1_needed_(0),
|
||||
+ feature_1_(0), feature_2_used_(0), feature_2_needed_(0),
|
||||
+ object_isa_1_used_(0), object_feature_1_(0),
|
||||
+ object_feature_2_used_(0), seen_first_object_(false)
|
||||
{ }
|
||||
|
||||
// Process the relocations to determine unreferenced sections for
|
||||
@@ -859,6 +863,21 @@ class Target_i386 : public Sized_target<32, false>
|
||||
this->rel_dyn_section(layout));
|
||||
}
|
||||
|
||||
+ // Record a target-specific program property in the .note.gnu.property
|
||||
+ // section.
|
||||
+ void
|
||||
+ record_gnu_property(unsigned int, unsigned int, size_t,
|
||||
+ const unsigned char*, const Object*);
|
||||
+
|
||||
+ // Merge the target-specific program properties from the current object.
|
||||
+ void
|
||||
+ merge_gnu_properties(const Object*);
|
||||
+
|
||||
+ // Finalize the target-specific program properties and add them back to
|
||||
+ // the layout.
|
||||
+ void
|
||||
+ do_finalize_gnu_properties(Layout*) const;
|
||||
+
|
||||
// Information about this specific target which we pass to the
|
||||
// general Target structure.
|
||||
static const Target::Target_info i386_info;
|
||||
@@ -898,6 +917,26 @@ class Target_i386 : public Sized_target<32, false>
|
||||
unsigned int got_mod_index_offset_;
|
||||
// True if the _TLS_MODULE_BASE_ symbol has been defined.
|
||||
bool tls_base_symbol_defined_;
|
||||
+
|
||||
+ // Target-specific program properties, from .note.gnu.property section.
|
||||
+ // Each bit represents a specific feature.
|
||||
+ uint32_t isa_1_used_;
|
||||
+ uint32_t isa_1_needed_;
|
||||
+ uint32_t feature_1_;
|
||||
+ uint32_t feature_2_used_;
|
||||
+ uint32_t feature_2_needed_;
|
||||
+ // Target-specific properties from the current object.
|
||||
+ // These bits get ORed into ISA_1_USED_ after all properties for the object
|
||||
+ // have been processed. But if either is all zeroes (as when the property
|
||||
+ // is absent from an object), the result should be all zeroes.
|
||||
+ // (See PR ld/23486.)
|
||||
+ uint32_t object_isa_1_used_;
|
||||
+ // These bits get ANDed into FEATURE_1_ after all properties for the object
|
||||
+ // have been processed.
|
||||
+ uint32_t object_feature_1_;
|
||||
+ uint32_t object_feature_2_used_;
|
||||
+ // Whether we have seen our first object, for use in initializing FEATURE_1_.
|
||||
+ bool seen_first_object_;
|
||||
};
|
||||
|
||||
const Target::Target_info Target_i386::i386_info =
|
||||
@@ -1042,6 +1081,126 @@ Target_i386::rel_irelative_section(Layout* layout)
|
||||
return this->rel_irelative_;
|
||||
}
|
||||
|
||||
+// Record a target-specific program property from the .note.gnu.property
|
||||
+// section.
|
||||
+void
|
||||
+Target_i386::record_gnu_property(
|
||||
+ unsigned int, unsigned int pr_type,
|
||||
+ size_t pr_datasz, const unsigned char* pr_data,
|
||||
+ const Object* object)
|
||||
+{
|
||||
+ uint32_t val = 0;
|
||||
+
|
||||
+ switch (pr_type)
|
||||
+ {
|
||||
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_USED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_USED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED:
|
||||
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED:
|
||||
+ if (pr_datasz != 4)
|
||||
+ {
|
||||
+ gold_warning(_("%s: corrupt .note.gnu.property section "
|
||||
+ "(pr_datasz for property %d is not 4)"),
|
||||
+ object->name().c_str(), pr_type);
|
||||
+ return;
|
||||
+ }
|
||||
+ val = elfcpp::Swap<32, false>::readval(pr_data);
|
||||
+ break;
|
||||
+ default:
|
||||
+ gold_warning(_("%s: unknown program property type 0x%x "
|
||||
+ "in .note.gnu.property section"),
|
||||
+ object->name().c_str(), pr_type);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ switch (pr_type)
|
||||
+ {
|
||||
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_USED:
|
||||
+ this->object_isa_1_used_ |= val;
|
||||
+ break;
|
||||
+ case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED:
|
||||
+ this->isa_1_needed_ |= val;
|
||||
+ break;
|
||||
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND:
|
||||
+ // If we see multiple feature props in one object, OR them together.
|
||||
+ this->object_feature_1_ |= val;
|
||||
+ break;
|
||||
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED:
|
||||
+ this->object_feature_2_used_ |= val;
|
||||
+ break;
|
||||
+ case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED:
|
||||
+ this->feature_2_needed_ |= val;
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+// Merge the target-specific program properties from the current object.
|
||||
+void
|
||||
+Target_i386::merge_gnu_properties(const Object*)
|
||||
+{
|
||||
+ if (this->seen_first_object_)
|
||||
+ {
|
||||
+ // If any object is missing the ISA_1_USED property, we must omit
|
||||
+ // it from the output file.
|
||||
+ if (this->object_isa_1_used_ == 0)
|
||||
+ this->isa_1_used_ = 0;
|
||||
+ else if (this->isa_1_used_ != 0)
|
||||
+ this->isa_1_used_ |= this->object_isa_1_used_;
|
||||
+ this->feature_1_ &= this->object_feature_1_;
|
||||
+ // If any object is missing the FEATURE_2_USED property, we must
|
||||
+ // omit it from the output file.
|
||||
+ if (this->object_feature_2_used_ == 0)
|
||||
+ this->feature_2_used_ = 0;
|
||||
+ else if (this->feature_2_used_ != 0)
|
||||
+ this->feature_2_used_ |= this->object_feature_2_used_;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ this->isa_1_used_ = this->object_isa_1_used_;
|
||||
+ this->feature_1_ = this->object_feature_1_;
|
||||
+ this->feature_2_used_ = this->object_feature_2_used_;
|
||||
+ this->seen_first_object_ = true;
|
||||
+ }
|
||||
+ this->object_isa_1_used_ = 0;
|
||||
+ this->object_feature_1_ = 0;
|
||||
+ this->object_feature_2_used_ = 0;
|
||||
+}
|
||||
+
|
||||
+static inline void
|
||||
+add_property(Layout* layout, unsigned int pr_type, uint32_t val)
|
||||
+{
|
||||
+ unsigned char buf[4];
|
||||
+ elfcpp::Swap<32, false>::writeval(buf, val);
|
||||
+ layout->add_gnu_property(elfcpp::NT_GNU_PROPERTY_TYPE_0, pr_type, 4, buf);
|
||||
+}
|
||||
+
|
||||
+// Finalize the target-specific program properties and add them back to
|
||||
+// the layout.
|
||||
+void
|
||||
+Target_i386::do_finalize_gnu_properties(Layout* layout) const
|
||||
+{
|
||||
+ if (this->isa_1_used_ != 0)
|
||||
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_ISA_1_USED,
|
||||
+ this->isa_1_used_);
|
||||
+ if (this->isa_1_needed_ != 0)
|
||||
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED,
|
||||
+ this->isa_1_needed_);
|
||||
+ if (this->feature_1_ != 0)
|
||||
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND,
|
||||
+ this->feature_1_);
|
||||
+ if (this->feature_2_used_ != 0)
|
||||
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED,
|
||||
+ this->feature_2_used_);
|
||||
+ if (this->feature_2_needed_ != 0)
|
||||
+ add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED,
|
||||
+ this->feature_2_needed_);
|
||||
+}
|
||||
+
|
||||
// Write the first three reserved words of the .got.plt section.
|
||||
// The remainder of the section is written while writing the PLT
|
||||
// in Output_data_plt_i386::do_write.
|
@ -1,19 +0,0 @@
|
||||
diff -rup binutils.orig/gold/layout.cc binutils-2.32/gold/layout.cc
|
||||
--- binutils.orig/gold/layout.cc 2019-06-24 14:37:36.013086899 +0100
|
||||
+++ binutils-2.32/gold/layout.cc 2019-06-24 14:41:40.054517479 +0100
|
||||
@@ -868,6 +868,7 @@ Layout::get_output_section(const char* n
|
||||
&& (same_name->flags() & elfcpp::SHF_TLS) == 0)
|
||||
os = same_name;
|
||||
}
|
||||
+#if 0 /* BZ 1722715, PR 17556. */
|
||||
else if ((flags & elfcpp::SHF_TLS) == 0)
|
||||
{
|
||||
elfcpp::Elf_Xword zero_flags = 0;
|
||||
@@ -878,6 +879,7 @@ Layout::get_output_section(const char* n
|
||||
if (p != this->section_name_map_.end())
|
||||
os = p->second;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
if (os == NULL)
|
@ -1,66 +0,0 @@
|
||||
Only in binutils-2.34/gold: autom4te.cache
|
||||
diff -rup binutils.orig/gold/configure binutils-2.34/gold/configure
|
||||
--- binutils.orig/gold/configure 2020-04-20 12:35:13.048297305 +0100
|
||||
+++ binutils-2.34/gold/configure 2020-04-20 14:02:06.743725696 +0100
|
||||
@@ -5180,7 +5180,8 @@ for targ in $target $canon_targets; do
|
||||
. ${srcdir}/configure.tgt
|
||||
|
||||
if test "$targ_obj" = "UNKNOWN"; then
|
||||
- as_fn_error $? "\"unsupported target $targ\"" "$LINENO" 5
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"unsupported target $targ\"" >&5
|
||||
+$as_echo "$as_me: WARNING: \"unsupported target $targ\"" >&2;}
|
||||
else
|
||||
targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)"
|
||||
if test "$targ_extra_obj" != ""; then
|
||||
diff -rup binutils.orig/gold/configure.ac binutils-2.34/gold/configure.ac
|
||||
--- binutils.orig/gold/configure.ac 2020-04-20 12:35:13.050297291 +0100
|
||||
+++ binutils-2.34/gold/configure.ac 2020-04-20 14:01:46.435868770 +0100
|
||||
@@ -181,7 +181,7 @@ for targ in $target $canon_targets; do
|
||||
. ${srcdir}/configure.tgt
|
||||
|
||||
if test "$targ_obj" = "UNKNOWN"; then
|
||||
- AC_MSG_ERROR("unsupported target $targ")
|
||||
+ AC_MSG_WARN("unsupported target $targ")
|
||||
else
|
||||
targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)"
|
||||
if test "$targ_extra_obj" != ""; then
|
||||
--- binutils.orig/ld/configure.tgt 2020-04-20 12:35:12.465301359 +0100
|
||||
+++ binutils-2.34/ld/configure.tgt 2020-04-20 14:17:52.123066333 +0100
|
||||
@@ -220,7 +220,7 @@ bfin-*-linux-uclibc*) targ_emul=elf32bfi
|
||||
targ_extra_emuls="elf32bfin"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-bpf-*-*) targ_emul=elf64bpf
|
||||
+bpf-* | bpf-*-*) targ_emul=elf64bpf
|
||||
;;
|
||||
cr16-*-elf*) targ_emul=elf32cr16
|
||||
;;
|
||||
@@ -1026,7 +1026,7 @@ z8k-*-coff) targ_emul=z8002
|
||||
targ_extra_ofiles=
|
||||
;;
|
||||
*)
|
||||
- echo 2>&1 "*** ld does not support target ${targ}"
|
||||
+ echo 2>&1 "*** ld does not support target '${targ}' NO REALLY"
|
||||
echo 2>&1 "*** see ld/configure.tgt for supported targets"
|
||||
exit 1
|
||||
|
||||
--- binutils.orig/bfd/config.bfd 2020-04-20 12:35:13.038297375 +0100
|
||||
+++ binutils-2.34/bfd/config.bfd 2020-04-20 14:25:26.452869193 +0100
|
||||
@@ -473,7 +473,7 @@ case "${targ}" in
|
||||
;;
|
||||
|
||||
#ifdef BFD64
|
||||
- bpf-*-none)
|
||||
+ bpf-*-none | bpf-*)
|
||||
targ_defvec=bpf_elf64_le_vec
|
||||
targ_selvecs=bpf_elf64_be_vec
|
||||
targ_underscore=yes
|
||||
@@ -1427,7 +1427,7 @@ case "${targ}" in
|
||||
;;
|
||||
|
||||
*)
|
||||
- echo 1>&2 "*** BFD does not support target ${targ}."
|
||||
+ echo 1>&2 "*** BFD does not support target '${targ}'. Honest."
|
||||
echo 1>&2 "*** Look in bfd/config.bfd for supported targets."
|
||||
exit 1
|
||||
;;
|
@ -1,236 +0,0 @@
|
||||
diff -rcp ../binutils-2.20.51.0.7.original/bfd/configure ./bfd/configure
|
||||
--- a/bfd/configure 2010-04-08 14:53:48.000000000 +0100
|
||||
+++ b/bfd/configure 2010-04-08 14:56:50.000000000 +0100
|
||||
@@ -10762,10 +10762,34 @@
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
+ # find out which ABI we are using
|
||||
+ libsuff=
|
||||
+ case "$host_cpu" in
|
||||
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
|
||||
+ echo 'int i;' > conftest.$ac_ext
|
||||
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ case `/usr/bin/file conftest.$ac_objext` in
|
||||
+ *64-bit*)
|
||||
+ libsuff=64
|
||||
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
|
||||
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
+ fi
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ rm -rf conftest*
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||
diff -rcp ../binutils-2.20.51.0.7.original/binutils/configure ./binutils/configure
|
||||
--- a/binutils/configure 2010-04-08 14:53:45.000000000 +0100
|
||||
+++ b/binutils/configure 2010-04-08 14:56:21.000000000 +0100
|
||||
@@ -10560,10 +10560,34 @@
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
+ # find out which ABI we are using
|
||||
+ libsuff=
|
||||
+ case "$host_cpu" in
|
||||
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
|
||||
+ echo 'int i;' > conftest.$ac_ext
|
||||
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ case `/usr/bin/file conftest.$ac_objext` in
|
||||
+ *64-bit*)
|
||||
+ libsuff=64
|
||||
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
|
||||
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
+ fi
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ rm -rf conftest*
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||
diff -rcp ../binutils-2.20.51.0.7.original/gas/configure ./gas/configure
|
||||
--- a/gas/configure 2010-04-08 14:53:47.000000000 +0100
|
||||
+++ b/gas/configure 2010-04-08 14:57:24.000000000 +0100
|
||||
@@ -10547,10 +10547,34 @@
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
+ # find out which ABI we are using
|
||||
+ libsuff=
|
||||
+ case "$host_cpu" in
|
||||
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
|
||||
+ echo 'int i;' > conftest.$ac_ext
|
||||
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ case `/usr/bin/file conftest.$ac_objext` in
|
||||
+ *64-bit*)
|
||||
+ libsuff=64
|
||||
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
|
||||
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
+ fi
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ rm -rf conftest*
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||
diff -rcp ../binutils-2.20.51.0.7.original/gprof/configure ./gprof/configure
|
||||
--- a/gprof/configure 2010-04-08 14:53:45.000000000 +0100
|
||||
+++ b/gprof/configure 2010-04-08 14:57:50.000000000 +0100
|
||||
@@ -10485,10 +10485,34 @@
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
+ # find out which ABI we are using
|
||||
+ libsuff=
|
||||
+ case "$host_cpu" in
|
||||
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
|
||||
+ echo 'int i;' > conftest.$ac_ext
|
||||
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ case `/usr/bin/file conftest.$ac_objext` in
|
||||
+ *64-bit*)
|
||||
+ libsuff=64
|
||||
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
|
||||
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
+ fi
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ rm -rf conftest*
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||
diff -rcp ../binutils-2.20.51.0.7.original/ld/configure ./ld/configure
|
||||
--- a/ld/configure 2010-04-08 14:53:44.000000000 +0100
|
||||
+++ b/ld/configure 2010-04-08 14:58:21.000000000 +0100
|
||||
@@ -10966,10 +10966,34 @@
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
+ # find out which ABI we are using
|
||||
+ libsuff=
|
||||
+ case "$host_cpu" in
|
||||
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
|
||||
+ echo 'int i;' > conftest.$ac_ext
|
||||
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ case `/usr/bin/file conftest.$ac_objext` in
|
||||
+ *64-bit*)
|
||||
+ libsuff=64
|
||||
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
|
||||
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
+ fi
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ rm -rf conftest*
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
||||
Only in .: .#libtool.m4
|
||||
Only in .: #libtool.m4#
|
||||
diff -rcp ../binutils-2.20.51.0.7.original/opcodes/configure ./opcodes/configure
|
||||
--- a/opcodes/configure 2010-04-08 14:53:45.000000000 +0100
|
||||
+++ b/opcodes/configure 2010-04-08 14:59:10.000000000 +0100
|
||||
@@ -10496,10 +10496,34 @@
|
||||
# before this can be enabled.
|
||||
hardcode_into_libs=yes
|
||||
|
||||
+ # find out which ABI we are using
|
||||
+ libsuff=
|
||||
+ case "$host_cpu" in
|
||||
+ x86_64*|s390*|powerpc*|ppc*|sparc*)
|
||||
+ echo 'int i;' > conftest.$ac_ext
|
||||
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
+ (eval $ac_compile) 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; then
|
||||
+ case `/usr/bin/file conftest.$ac_objext` in
|
||||
+ *64-bit*)
|
||||
+ libsuff=64
|
||||
+ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
|
||||
+ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
|
||||
+ fi
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
|
||||
+ ;;
|
||||
+ esac
|
||||
+ fi
|
||||
+ rm -rf conftest*
|
||||
+ ;;
|
||||
+ esac
|
||||
+
|
||||
# Append ld.so.conf contents to the search path
|
||||
if test -f /etc/ld.so.conf; then
|
||||
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
|
||||
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
|
||||
+ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
|
||||
fi
|
||||
|
||||
# We used to test for /lib/ld.so.1 and disable shared libraries on
|
@ -1,28 +0,0 @@
|
||||
diff -rup binutils.orig/ltmain.sh binutils-2.37/ltmain.sh
|
||||
--- binutils.orig/ltmain.sh 2022-01-27 16:23:09.304207432 +0000
|
||||
+++ binutils-2.37/ltmain.sh 2022-01-27 16:23:18.380143759 +0000
|
||||
@@ -7103,6 +7103,7 @@ EOF
|
||||
rpath="$finalize_rpath"
|
||||
test "$mode" != relink && rpath="$compile_rpath$rpath"
|
||||
for libdir in $rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
@@ -7798,6 +7799,7 @@ EOF
|
||||
rpath=
|
||||
hardcode_libdirs=
|
||||
for libdir in $compile_rpath $finalize_rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
@@ -7849,6 +7851,7 @@ EOF
|
||||
rpath=
|
||||
hardcode_libdirs=
|
||||
for libdir in $finalize_rpath; do
|
||||
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
|
||||
if test -n "$hardcode_libdir_flag_spec"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
if test -z "$hardcode_libdirs"; then
|
||||
Only in binutils-2.37: ltmain.sh.orig
|
@ -1,28 +0,0 @@
|
||||
--- a/bfd/bfd-in.h 2012-08-02 10:56:34.561769686 +0100
|
||||
+++ b/bfd/bfd-in.h 2012-08-02 11:13:27.134797755 +0100
|
||||
@@ -25,11 +25,6 @@
|
||||
#ifndef __BFD_H_SEEN__
|
||||
#define __BFD_H_SEEN__
|
||||
|
||||
-/* PR 14072: Ensure that config.h is included first. */
|
||||
-#if !defined PACKAGE && !defined PACKAGE_VERSION
|
||||
-#error config.h must be included before this header
|
||||
-#endif
|
||||
-
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
--- a/bfd/bfd-in2.h 2012-08-02 10:56:34.349769680 +0100
|
||||
+++ b/bfd/bfd-in2.h 2012-08-02 11:13:40.015798113 +0100
|
||||
@@ -32,11 +32,6 @@
|
||||
#ifndef __BFD_H_SEEN__
|
||||
#define __BFD_H_SEEN__
|
||||
|
||||
-/* PR 14072: Ensure that config.h is included first. */
|
||||
-#if !defined PACKAGE && !defined PACKAGE_VERSION
|
||||
-#error config.h must be included before this header
|
||||
-#endif
|
||||
-
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
70
binutilscompare
Executable file
70
binutilscompare
Executable file
@ -0,0 +1,70 @@
|
||||
#! /usr/bin/perl
|
||||
# Compare build logs for the testsuite results regressions.
|
||||
# $Id$
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Data::Dumper;
|
||||
|
||||
my $reverse=shift @ARGV if ($ARGV[0]||"") eq "-r";
|
||||
|
||||
sub readfile($)
|
||||
{
|
||||
my($filename)=@_;
|
||||
|
||||
local *F;
|
||||
open F,$filename or die "open \"$filename\": $!";
|
||||
my $F=do { local $/; <F>; };
|
||||
close F or die "close \"$filename\": $!";
|
||||
return $F;
|
||||
}
|
||||
|
||||
sub writefile($$)
|
||||
{
|
||||
my($filename,$content)=@_;
|
||||
|
||||
local *F;
|
||||
open F,">$filename" or die "create \"$filename\": $!";
|
||||
print F $content or die "write \"$filename\": $!";
|
||||
close F or die "close \"$filename\": $!";
|
||||
}
|
||||
|
||||
local *DIR;
|
||||
opendir DIR,"tests" or die "opendir: $!";
|
||||
my %arch;
|
||||
for my $name (sort readdir(DIR)) {
|
||||
next if $name!~/-([^-]*)[.]log$/o;
|
||||
my $arch=$1;
|
||||
(my $sum=$name)=~s/log$/sum/ or die;
|
||||
my $i=readfile "tests/$name";
|
||||
my $o="";
|
||||
while ($i=~/\n(Native configuration is.*?Summary ===\n.*?\n)make\Q[\E/gs) {
|
||||
$o.=$1;
|
||||
}
|
||||
# Version string differs.
|
||||
$o=~s{/builddir/build/BUILD/binutils-[^/]*/+}{}g;
|
||||
$o=~s{^(Version .*) 20\d{6}$}{$1}mg;
|
||||
$o=~s{^(\Q../as-new\E) 20\d{6}$}{$1}mg;
|
||||
$o=~s{^(build-[^/]*/ld/ld-new) 20\d{6}$}{$1}mg;
|
||||
writefile "tests/$sum",$o;
|
||||
push @{$arch{$arch}},$sum;
|
||||
}
|
||||
closedir DIR or die "closedir: $!";
|
||||
|
||||
for (values(%arch)) {
|
||||
next if 2==@$_;
|
||||
warn "Single element: ".${$_}[0]."\n" if 1==@$_;
|
||||
die "Not 2 elements:\n".Dumper($_) if 1!=@$_;
|
||||
}
|
||||
|
||||
system("rm -f tests/gdbcompare-*.diff") and die;
|
||||
|
||||
for my $arch (sort keys(%arch)) {
|
||||
next if 2!=@{$arch{$arch}};
|
||||
# sub trans { return {"."=>0,"-"=>1}->{($_[0]=~/([-.])[^-.]+[.]\w+$/)[0]}.$_[0]; };
|
||||
sub trans { return $_[0]; };
|
||||
my @sorted=sort { my $a1=trans $a; my $b1=trans $b; ($b1 cmp $a1) * ($reverse ? -1 : +1); } @{$arch{$arch}};
|
||||
do { system $_ and die $_; } for "diff -u tests/'".$sorted[1]."' tests/'".$sorted[0]."' >tests/gdbcompare-'$arch'.sum.diff;true";
|
||||
}
|
||||
|
||||
system("vim tests/gdbcompare-*.sum.diff");
|
1
dead.package
Normal file
1
dead.package
Normal file
@ -0,0 +1 @@
|
||||
gcc-toolset-13-binutils package is retired on branch c10s for CS-2551
|
14
gating.yaml
Normal file
14
gating.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-qe.koji-build.scratch-build.validation}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-fast-lane.functional}
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-slow-lane.functional}
|
25
plans/build-gating.fmf
Normal file
25
plans/build-gating.fmf
Normal file
@ -0,0 +1,25 @@
|
||||
#
|
||||
# Build/PR gating tests for binutils
|
||||
#
|
||||
|
||||
/common:
|
||||
plan:
|
||||
import:
|
||||
url: https://src.fedoraproject.org/tests/binutils.git
|
||||
ref: main
|
||||
name: /plans/build-gating/common
|
||||
|
||||
/kernel-rebuild:
|
||||
plan:
|
||||
import:
|
||||
url: https://src.fedoraproject.org/tests/binutils.git
|
||||
ref: main
|
||||
name: /plans/build-gating/kernel-rebuild
|
||||
|
||||
adjust+:
|
||||
- because: "Plan to be ran when executed locally, or executed by CI system to gate a build or PR."
|
||||
when: >-
|
||||
trigger is defined
|
||||
and trigger != commit
|
||||
and trigger != build
|
||||
enabled: false
|
16
rpminspect.yaml
Normal file
16
rpminspect.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
|
||||
debuginfo:
|
||||
ignore:
|
||||
- /usr/lib/debug/opt/rh/gcc-toolset-13/root/usr/lib64/*.debug
|
||||
- /usr/lib/debug/opt/rh/gcc-toolset-13/root/usr/lib64/bfd-plugins/*.debug
|
||||
- /usr/lib/debug/opt/rh/gcc-toolset-13/root/usr/lib64/gprofng/*.debug
|
||||
- /usr/lib/debug/opt/rh/gcc-toolset-13/root/usr/bin/*.debug
|
||||
- /usr/lib/debug/opt/rh/gcc-toolset-13/root/usr/lib/*.debug
|
||||
- /usr/lib/debug/opt/rh/gcc-toolset-13/root/usr/lib/bfd-plugins/*.debug
|
||||
|
||||
specname:
|
||||
primary: filename
|
||||
|
||||
unicode:
|
||||
exclude: ^binutils-\d+.\d+\/gas\/testsuite\/gas\/all\/multibyte.s$
|
2
sources
Normal file
2
sources
Normal file
@ -0,0 +1,2 @@
|
||||
SHA512 (binutils-2.40.tar.xz) = a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
|
||||
SHA512 (binutils-2.19.50.0.1-output-format.sed) = 2f8686b0c8af13c98cda056824c2820416f6e2d003f70b78ccf5314525b9ee3684d421dfa83e638a2d42d06ea4d4bdaf5226b64d6ec26f7ff59c44ffb2a23dd2
|
Loading…
Reference in New Issue
Block a user