sync with Debian
version: 2.45-6 (released to unstable) commit: 76549fcba94044939c778ba49cec10dbf11e5d89
This commit is contained in:
563
debian/patches/branch-updates.diff
vendored
563
debian/patches/branch-updates.diff
vendored
@@ -1,12 +1,23 @@
|
||||
# DP: updates from the binutils-2.45 branch
|
||||
|
||||
# git diff 2bc7af1ff7732451b6a7b09462a815c3284f9613 f3723832ffdd77f7b387d2c26d73eecf0321b3bd
|
||||
# git diff 2bc7af1ff7732451b6a7b09462a815c3284f9613 3af34f64c67e19658f7f5cde7d1734868f029096
|
||||
|
||||
diff --git a/bfd/archive.c b/bfd/archive.c
|
||||
index 8e20554d781..c61d4b12658 100644
|
||||
index 8e20554d781..697b2ed23f2 100644
|
||||
--- a/bfd/archive.c
|
||||
+++ b/bfd/archive.c
|
||||
@@ -2299,7 +2299,6 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
|
||||
@@ -141,6 +141,10 @@ SUBSECTION
|
||||
#include "hashtab.h"
|
||||
#include "filenames.h"
|
||||
#include "bfdlink.h"
|
||||
+#if BFD_SUPPORTS_PLUGINS
|
||||
+#include "plugin-api.h"
|
||||
+#include "plugin.h"
|
||||
+#endif
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
@@ -2299,7 +2303,6 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
|
||||
{
|
||||
char *first_name = NULL;
|
||||
bfd *current;
|
||||
@@ -14,7 +25,7 @@ index 8e20554d781..c61d4b12658 100644
|
||||
struct orl *map = NULL;
|
||||
unsigned int orl_max = 1024; /* Fine initial default. */
|
||||
unsigned int orl_count = 0;
|
||||
@@ -2334,7 +2333,7 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
|
||||
@@ -2334,7 +2337,7 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
|
||||
/* Map over each element. */
|
||||
for (current = arch->archive_head;
|
||||
current != NULL;
|
||||
@@ -23,6 +34,54 @@ index 8e20554d781..c61d4b12658 100644
|
||||
{
|
||||
if (bfd_check_format (current, bfd_object)
|
||||
&& (bfd_get_file_flags (current) & HAS_SYMS) != 0)
|
||||
@@ -2344,6 +2347,9 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
|
||||
long src_count;
|
||||
|
||||
if (bfd_get_lto_type (current) == lto_slim_ir_object
|
||||
+#if BFD_SUPPORTS_PLUGINS
|
||||
+ && !bfd_plugin_target_p (current->xvec)
|
||||
+#endif
|
||||
&& report_plugin_err)
|
||||
{
|
||||
report_plugin_err = false;
|
||||
@@ -2401,6 +2407,9 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
|
||||
|
||||
if (bfd_lto_slim_symbol_p (current,
|
||||
syms[src_count]->name)
|
||||
+#if BFD_SUPPORTS_PLUGINS
|
||||
+ && !bfd_plugin_target_p (current->xvec)
|
||||
+#endif
|
||||
&& report_plugin_err)
|
||||
{
|
||||
report_plugin_err = false;
|
||||
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
|
||||
index 2ff3e930bfa..bcff44a0f44 100644
|
||||
--- a/bfd/bfd-in2.h
|
||||
+++ b/bfd/bfd-in2.h
|
||||
@@ -2131,6 +2131,9 @@ struct bfd
|
||||
/* Set if this is the linker input BFD. */
|
||||
unsigned int is_linker_input : 1;
|
||||
|
||||
+ /* Set if this is the strip input BFD. */
|
||||
+ unsigned int is_strip_input : 1;
|
||||
+
|
||||
/* If this is an input for a compiler plug-in library. */
|
||||
ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2;
|
||||
|
||||
diff --git a/bfd/bfd.c b/bfd/bfd.c
|
||||
index 858ab5ce017..4aded6809bb 100644
|
||||
--- a/bfd/bfd.c
|
||||
+++ b/bfd/bfd.c
|
||||
@@ -296,6 +296,9 @@ CODE_FRAGMENT
|
||||
. {* Set if this is the linker input BFD. *}
|
||||
. unsigned int is_linker_input : 1;
|
||||
.
|
||||
+. {* Set if this is the strip input BFD. *}
|
||||
+. unsigned int is_strip_input : 1;
|
||||
+.
|
||||
. {* If this is an input for a compiler plug-in library. *}
|
||||
. ENUM_BITFIELD (bfd_plugin_format) plugin_format : 2;
|
||||
.
|
||||
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c
|
||||
index 8c4d4f7bf73..1213a159358 100644
|
||||
--- a/bfd/coff-mips.c
|
||||
@@ -433,8 +492,72 @@ index 46fafb332de..505f1196987 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/bfd/format.c b/bfd/format.c
|
||||
index f3a0774af08..246838c7ab5 100644
|
||||
--- a/bfd/format.c
|
||||
+++ b/bfd/format.c
|
||||
@@ -413,6 +413,11 @@ bfd_set_lto_type (bfd *abfd ATTRIBUTE_UNUSED)
|
||||
abfd->object_only_section = sec;
|
||||
break;
|
||||
}
|
||||
+ else if (strcmp (sec->name, ".llvm.lto") == 0)
|
||||
+ {
|
||||
+ type = lto_fat_ir_object;
|
||||
+ break;
|
||||
+ }
|
||||
else if (lsection.major_version == 0
|
||||
&& startswith (sec->name, ".gnu.lto_.lto.")
|
||||
&& bfd_get_section_contents (abfd, sec, &lsection, 0,
|
||||
@@ -481,10 +486,7 @@ bfd_check_format_matches_lto (bfd *abfd, bfd_format format,
|
||||
}
|
||||
|
||||
if (abfd->format != bfd_unknown)
|
||||
- {
|
||||
- bfd_set_lto_type (abfd);
|
||||
- return abfd->format == format;
|
||||
- }
|
||||
+ return abfd->format == format;
|
||||
|
||||
if (matching != NULL || *bfd_associated_vector != NULL)
|
||||
{
|
||||
@@ -537,7 +539,20 @@ bfd_check_format_matches_lto (bfd *abfd, bfd_format format,
|
||||
|
||||
cleanup = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
|
||||
|
||||
- if (cleanup)
|
||||
+ /* When called from strip, don't treat archive member nor
|
||||
+ standalone fat IR object as an IR object. For archive
|
||||
+ member, it will be copied as an unknown object if the
|
||||
+ plugin target is in use or it is a slim IR object. For
|
||||
+ standalone fat IR object, it will be copied as non-IR
|
||||
+ object. */
|
||||
+ if (cleanup
|
||||
+#if BFD_SUPPORTS_PLUGINS
|
||||
+ && (!abfd->is_strip_input
|
||||
+ || !bfd_plugin_target_p (abfd->xvec)
|
||||
+ || (abfd->lto_type != lto_fat_ir_object
|
||||
+ && abfd->my_archive == NULL))
|
||||
+#endif
|
||||
+ )
|
||||
goto ok_ret;
|
||||
|
||||
/* For a long time the code has dropped through to check all
|
||||
diff --git a/bfd/plugin.c b/bfd/plugin.c
|
||||
index 1c72b748a8f..6dd22d75137 100644
|
||||
--- a/bfd/plugin.c
|
||||
+++ b/bfd/plugin.c
|
||||
@@ -203,6 +203,9 @@ bfd_plugin_get_symbols_in_object_only (bfd *abfd)
|
||||
bfd_close (nbfd);
|
||||
return;
|
||||
}
|
||||
+
|
||||
+ /* Copy LTO type derived from input sections. */
|
||||
+ abfd->lto_type = nbfd->lto_type;
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/bfd/version.h b/bfd/version.h
|
||||
index beed058a6be..87fce6dafb3 100644
|
||||
index beed058a6be..d94c933b73b 100644
|
||||
--- a/bfd/version.h
|
||||
+++ b/bfd/version.h
|
||||
@@ -16,7 +16,7 @@
|
||||
@@ -442,7 +565,7 @@ index beed058a6be..87fce6dafb3 100644
|
||||
In releases, the date is not included in either version strings or
|
||||
sonames. */
|
||||
-#define BFD_VERSION_DATE 20250727
|
||||
+#define BFD_VERSION_DATE 20250816
|
||||
+#define BFD_VERSION_DATE 20250902
|
||||
#define BFD_VERSION @bfd_version@
|
||||
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
|
||||
#define REPORT_BUGS_TO @report_bugs_to@
|
||||
@@ -539,8 +662,35 @@ index 94be22505d4..0ff4539f458 100755
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
diff --git a/binutils/nm.c b/binutils/nm.c
|
||||
index a5d56311dde..d44083dcc94 100644
|
||||
--- a/binutils/nm.c
|
||||
+++ b/binutils/nm.c
|
||||
@@ -802,6 +802,9 @@ filter_symbols (bfd *abfd, bool is_dynamic, void *minisyms,
|
||||
continue;
|
||||
|
||||
if (bfd_lto_slim_symbol_p (abfd, sym->name)
|
||||
+#if BFD_SUPPORTS_PLUGINS
|
||||
+ && !bfd_plugin_target_p (abfd->xvec)
|
||||
+#endif
|
||||
&& report_plugin_err)
|
||||
{
|
||||
report_plugin_err = false;
|
||||
@@ -1484,7 +1487,11 @@ display_rel_file (bfd *abfd, bfd *archive_bfd)
|
||||
|
||||
/* lto_type is set to lto_non_ir_object when a bfd is loaded with a
|
||||
compiler LTO plugin. */
|
||||
- if (bfd_get_lto_type (abfd) == lto_slim_ir_object)
|
||||
+ if (bfd_get_lto_type (abfd) == lto_slim_ir_object
|
||||
+#if BFD_SUPPORTS_PLUGINS
|
||||
+ && !bfd_plugin_target_p (abfd->xvec)
|
||||
+#endif
|
||||
+ )
|
||||
{
|
||||
report_plugin_err = false;
|
||||
non_fatal (_("%s: plugin needed to handle lto object"),
|
||||
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
|
||||
index 038f6555c0b..905ce917708 100644
|
||||
index 038f6555c0b..a5690257059 100644
|
||||
--- a/binutils/objcopy.c
|
||||
+++ b/binutils/objcopy.c
|
||||
@@ -2529,7 +2529,6 @@ merge_gnu_build_notes (bfd * abfd,
|
||||
@@ -574,6 +724,131 @@ index 038f6555c0b..905ce917708 100644
|
||||
}
|
||||
|
||||
#if DEBUG_MERGE
|
||||
@@ -2668,7 +2661,8 @@ set_long_section_mode (bfd *output_bfd, bfd *input_bfd, enum long_section_name_h
|
||||
Returns TRUE upon success, FALSE otherwise. */
|
||||
|
||||
static bool
|
||||
-copy_object (bfd *ibfd, bfd *obfd, const bfd_arch_info_type *input_arch)
|
||||
+copy_object (bfd *ibfd, bfd *obfd, const bfd_arch_info_type *input_arch,
|
||||
+ bool target_defaulted)
|
||||
{
|
||||
bfd_vma start;
|
||||
long symcount;
|
||||
@@ -2819,7 +2813,7 @@ copy_object (bfd *ibfd, bfd *obfd, const bfd_arch_info_type *input_arch)
|
||||
imach = 0;
|
||||
}
|
||||
if (!bfd_set_arch_mach (obfd, iarch, imach)
|
||||
- && (ibfd->target_defaulted
|
||||
+ && (target_defaulted
|
||||
|| bfd_get_arch (ibfd) != bfd_get_arch (obfd)))
|
||||
{
|
||||
if (bfd_get_arch (ibfd) == bfd_arch_unknown)
|
||||
@@ -3622,7 +3616,8 @@ fail:
|
||||
static bool
|
||||
copy_archive (bfd *ibfd, bfd *obfd, const char *output_target,
|
||||
bool force_output_target,
|
||||
- const bfd_arch_info_type *input_arch)
|
||||
+ const bfd_arch_info_type *input_arch,
|
||||
+ bool target_defaulted)
|
||||
{
|
||||
struct name_list
|
||||
{
|
||||
@@ -3692,6 +3687,8 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target,
|
||||
bool ok_object;
|
||||
const char *element_name;
|
||||
|
||||
+ this_element->is_strip_input = 1;
|
||||
+
|
||||
element_name = bfd_get_filename (this_element);
|
||||
/* PR binutils/17533: Do not allow directory traversal
|
||||
outside of the current directory tree by archive members. */
|
||||
@@ -3773,13 +3770,16 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target,
|
||||
|
||||
#if BFD_SUPPORTS_PLUGINS
|
||||
/* Copy LTO IR file as unknown object. */
|
||||
- if (bfd_plugin_target_p (this_element->xvec))
|
||||
+ if ((!lto_sections_removed
|
||||
+ && this_element->lto_type == lto_slim_ir_object)
|
||||
+ || bfd_plugin_target_p (this_element->xvec))
|
||||
ok_object = false;
|
||||
else
|
||||
#endif
|
||||
if (ok_object)
|
||||
{
|
||||
- ok = copy_object (this_element, output_element, input_arch);
|
||||
+ ok = copy_object (this_element, output_element, input_arch,
|
||||
+ target_defaulted);
|
||||
|
||||
if (!ok && bfd_get_arch (this_element) == bfd_arch_unknown)
|
||||
/* Try again as an unknown object file. */
|
||||
@@ -3879,6 +3879,8 @@ copy_file (const char *input_filename, const char *output_filename, int ofd,
|
||||
char **core_matching;
|
||||
off_t size = get_file_size (input_filename);
|
||||
const char *target = input_target;
|
||||
+ bool target_defaulted = (!input_target
|
||||
+ || strcmp (input_target, "default") == 0);
|
||||
|
||||
if (size < 1)
|
||||
{
|
||||
@@ -3948,6 +3950,8 @@ copy_file (const char *input_filename, const char *output_filename, int ofd,
|
||||
break;
|
||||
}
|
||||
|
||||
+ ibfd->is_strip_input = 1;
|
||||
+
|
||||
if (bfd_check_format (ibfd, bfd_archive))
|
||||
{
|
||||
bool force_output_target;
|
||||
@@ -3955,7 +3959,8 @@ copy_file (const char *input_filename, const char *output_filename, int ofd,
|
||||
|
||||
/* bfd_get_target does not return the correct value until
|
||||
bfd_check_format succeeds. */
|
||||
- if (output_target == NULL)
|
||||
+ if (output_target == NULL
|
||||
+ || strcmp (output_target, "default") == 0)
|
||||
{
|
||||
output_target = bfd_get_target (ibfd);
|
||||
force_output_target = false;
|
||||
@@ -3986,7 +3991,7 @@ copy_file (const char *input_filename, const char *output_filename, int ofd,
|
||||
}
|
||||
|
||||
if (!copy_archive (ibfd, obfd, output_target, force_output_target,
|
||||
- input_arch))
|
||||
+ input_arch, target_defaulted))
|
||||
status = 1;
|
||||
}
|
||||
else if (
|
||||
@@ -4010,7 +4015,8 @@ copy_file (const char *input_filename, const char *output_filename, int ofd,
|
||||
|
||||
/* bfd_get_target does not return the correct value until
|
||||
bfd_check_format succeeds. */
|
||||
- if (output_target == NULL)
|
||||
+ if (output_target == NULL
|
||||
+ || strcmp (output_target, "default") == 0)
|
||||
output_target = bfd_get_target (ibfd);
|
||||
|
||||
if (ofd >= 0)
|
||||
@@ -4041,7 +4047,7 @@ copy_file (const char *input_filename, const char *output_filename, int ofd,
|
||||
else
|
||||
#endif
|
||||
{
|
||||
- if (! copy_object (ibfd, obfd, input_arch))
|
||||
+ if (! copy_object (ibfd, obfd, input_arch, target_defaulted))
|
||||
status = 1;
|
||||
|
||||
/* PR 17512: file: 0f15796a.
|
||||
@@ -5066,6 +5072,11 @@ strip_main (int argc, char *argv[])
|
||||
SECTION_CONTEXT_REMOVE)
|
||||
|| !!find_section_list (".llvm.lto", false,
|
||||
SECTION_CONTEXT_REMOVE));
|
||||
+ /* NB: Must keep .gnu.debuglto_* sections unless all GCC LTO sections
|
||||
+ will be removed to avoid undefined references to symbols in GCC LTO
|
||||
+ debug sections. */
|
||||
+ if (!lto_sections_removed)
|
||||
+ find_section_list (".gnu.debuglto_*", true, SECTION_CONTEXT_KEEP);
|
||||
#endif
|
||||
|
||||
i = optind;
|
||||
diff --git a/binutils/resbin.c b/binutils/resbin.c
|
||||
index 889126e9e32..fa77cd43d23 100644
|
||||
--- a/binutils/resbin.c
|
||||
@@ -614,6 +889,87 @@ index 889126e9e32..fa77cd43d23 100644
|
||||
&vi->u.var.key, &verlen, &vallen,
|
||||
&type, &off))
|
||||
return NULL;
|
||||
diff --git a/binutils/testsuite/binutils-all/x86-64/pr33230.obj.bz2 b/binutils/testsuite/binutils-all/x86-64/pr33230.obj.bz2
|
||||
new file mode 100644
|
||||
index 00000000000..6309a2ad810
|
||||
Binary files /dev/null and b/binutils/testsuite/binutils-all/x86-64/pr33230.obj.bz2 differ
|
||||
diff --git a/binutils/testsuite/binutils-all/x86-64/x86-64.exp b/binutils/testsuite/binutils-all/x86-64/x86-64.exp
|
||||
index ab1aa50a9a1..6d1b308eca6 100644
|
||||
--- a/binutils/testsuite/binutils-all/x86-64/x86-64.exp
|
||||
+++ b/binutils/testsuite/binutils-all/x86-64/x86-64.exp
|
||||
@@ -254,3 +254,72 @@ run_pr33198_test "" "-R .gnu.lto_* -R .gnu.debuglto_* -R .llvm.lto -N __gnu_lto_
|
||||
run_pr33198_test "-fat" "-R .gnu.lto_* -R .gnu.debuglto_* -R .llvm.lto -N __gnu_lto_v1"
|
||||
run_pr33198_test "" "-R .llvm.lto"
|
||||
run_pr33198_test "-fat" "-R .llvm.lto"
|
||||
+
|
||||
+proc run_pr33230_test { testname obj strip_flags run_readelf } {
|
||||
+ global srcdir
|
||||
+ global subdir
|
||||
+ global READELF
|
||||
+ global STRIP
|
||||
+
|
||||
+ append strip_flags " --strip-debug"
|
||||
+ append testname " ($strip_flags)"
|
||||
+
|
||||
+ set cmd "$STRIP $strip_flags $obj -o ${obj}.strip"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if { $run_readelf == "yes" } {
|
||||
+ if ![string match "" $got] then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname (${obj})"
|
||||
+ return
|
||||
+ }
|
||||
+ set cmd "$READELF -h $obj"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if { ![regexp "Machine: +AArch64" $got] } then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname (${obj})"
|
||||
+ return
|
||||
+ }
|
||||
+ set cmd "$READELF -h ${obj}.strip"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if { ![regexp "Machine: +AArch64" $got] } then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname (${obj}.strip)"
|
||||
+ return
|
||||
+ }
|
||||
+ } elseif { ![regexp "Unable to recognise the format" $got] } then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname"
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ pass "$testname"
|
||||
+}
|
||||
+
|
||||
+set t $srcdir/$subdir/pr33230.obj.bz2
|
||||
+# We need to strip the ".bz2", but can leave the dirname.
|
||||
+set test $subdir/[file tail $t]
|
||||
+set testname [file rootname $test]
|
||||
+verbose $testname
|
||||
+set obj tmpdir/pr33230.o
|
||||
+if {[catch "system \"bzip2 -dc $t > $obj\""] != 0} {
|
||||
+ untested "bzip2 -dc ($testname)"
|
||||
+} else {
|
||||
+ catch "exec $STRIP --help" got
|
||||
+ if { [regexp "elf64-littleaarch64" $got] } {
|
||||
+ set run_readelf "yes"
|
||||
+ } else {
|
||||
+ set run_readelf "no"
|
||||
+ }
|
||||
+ run_pr33230_test "$testname" $obj "" $run_readelf
|
||||
+ run_pr33230_test "$testname" $obj "--input-target=default" $run_readelf
|
||||
+}
|
||||
diff --git a/gas/config/tc-cr16.c b/gas/config/tc-cr16.c
|
||||
index 99bc1bdd506..f2d110868f8 100644
|
||||
--- a/gas/config/tc-cr16.c
|
||||
@@ -1228,6 +1584,199 @@ index 00000000000..e02e16b7d26
|
||||
+.globl _start
|
||||
+.set _start, 1b
|
||||
+.size _start, 2b - 1b
|
||||
diff --git a/ld/testsuite/ld-plugin/lto-binutils.exp b/ld/testsuite/ld-plugin/lto-binutils.exp
|
||||
index 5b4e0a10991..51332696d5b 100644
|
||||
--- a/ld/testsuite/ld-plugin/lto-binutils.exp
|
||||
+++ b/ld/testsuite/ld-plugin/lto-binutils.exp
|
||||
@@ -356,3 +356,178 @@ run_cc_link_tests [list \
|
||||
"tmpdir/libstrip-1b-fat-s.a" \
|
||||
] \
|
||||
]
|
||||
+
|
||||
+proc run_pr33246_test { llvm fat } {
|
||||
+ global srcdir
|
||||
+ global subdir
|
||||
+ global plug_opt
|
||||
+ global llvm_plug_opt
|
||||
+ global ar
|
||||
+ global CLANG_FOR_TARGET
|
||||
+ global CC_FOR_TARGET
|
||||
+ global NM
|
||||
+ global READELF
|
||||
+ global strip
|
||||
+
|
||||
+ set strip_flags "--strip-debug --enable-deterministic-archives"
|
||||
+
|
||||
+ set test pr33246
|
||||
+ set testname "${test}${llvm}${fat} with $strip_flags"
|
||||
+
|
||||
+ if { "$llvm" == "-llvm" } {
|
||||
+ # Skip native x32 and i?86 targets since system LLVMgold.so may
|
||||
+ # not be compatible with native x32 and i?86 targets binutils.
|
||||
+ if { [istarget "x86_64-*-linux*-gnux32"]
|
||||
+ || [istarget "i?86-*-*"]
|
||||
+ || ![info exists CLANG_FOR_TARGET]
|
||||
+ || [string match "" $llvm_plug_opt] } then {
|
||||
+ untested $testname
|
||||
+ return
|
||||
+ }
|
||||
+ set CC $CLANG_FOR_TARGET
|
||||
+ set binutils_plug_opt "$llvm_plug_opt"
|
||||
+ } else {
|
||||
+ if { ![info exists CC_FOR_TARGET]
|
||||
+ || [string match "" $plug_opt] } then {
|
||||
+ untested $testname
|
||||
+ return
|
||||
+ }
|
||||
+ set CC $CC_FOR_TARGET
|
||||
+ set binutils_plug_opt "$plug_opt"
|
||||
+ }
|
||||
+
|
||||
+ append strip_flags " $binutils_plug_opt"
|
||||
+
|
||||
+ set src $srcdir/$subdir/${test}.c
|
||||
+ set obj tmpdir/${test}${llvm}${fat}.o
|
||||
+ set archive tmpdir/${test}${llvm}${fat}.a
|
||||
+ set CFLAGS "-c -g -O2 -flto"
|
||||
+ if { "$fat" == "-fat" } {
|
||||
+ append CFLAGS " -ffat-lto-objects"
|
||||
+ } else {
|
||||
+ append CFLAGS " -fno-fat-lto-objects"
|
||||
+ }
|
||||
+
|
||||
+ set cmd "$CC $CFLAGS -o $obj $src"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if ![string match "" $got] then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname ($obj)"
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ set cmd "$strip $strip_flags $obj -o ${obj}.strip"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if ![string match "" $got] then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname (strip $obj)"
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ set cmd "$NM $binutils_plug_opt ${obj}.strip"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if ![regexp "0+ T foo" $got] then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname (strip $obj)"
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ if { "$fat" == "-fat" } {
|
||||
+ set cmd "$READELF -SW ${obj}.strip"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if [regexp " \.debug_" $got] then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname (strip $obj)"
|
||||
+ return
|
||||
+ }
|
||||
+ } else {
|
||||
+ set cmd "cmp $obj ${obj}.strip"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if ![string match "" $got] then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname (strip $obj)"
|
||||
+ return
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ pass "$testname (strip $obj)"
|
||||
+
|
||||
+ set cmd "$ar $binutils_plug_opt -D -s -r -c $archive $obj"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if ![string match "" $got] then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname ($archive)"
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ set cmd "$strip $strip_flags $archive -o ${archive}.strip"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if ![string match "" $got] then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname (strip $archive)"
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ set cmd "$NM $binutils_plug_opt ${archive}.strip"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if ![regexp "0+ T foo" $got] then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname (strip $archive)"
|
||||
+ return
|
||||
+ }
|
||||
+
|
||||
+ if { "$fat" == "-fat" } {
|
||||
+ set cmd "$READELF -SW ${archive}.strip"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if [regexp " \.debug_" $got] then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname (strip $archive)"
|
||||
+ return
|
||||
+ }
|
||||
+ } else {
|
||||
+ set cmd "cmp $archive ${archive}.strip"
|
||||
+ send_log "$cmd\n"
|
||||
+ verbose "$cmd" 1
|
||||
+ catch "exec $cmd" got
|
||||
+ if ![string match "" $got] then {
|
||||
+ send_log "$got\n"
|
||||
+ verbose "$got" 1
|
||||
+ fail "$testname (strip $archive)"
|
||||
+ return
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ pass "$testname (strip $archive)"
|
||||
+}
|
||||
+
|
||||
+run_pr33246_test "" ""
|
||||
+run_pr33246_test "" "-fat"
|
||||
+run_pr33246_test "-llvm" ""
|
||||
+run_pr33246_test "-llvm" "-fat"
|
||||
diff --git a/ld/testsuite/ld-plugin/pr33246.c b/ld/testsuite/ld-plugin/pr33246.c
|
||||
new file mode 100644
|
||||
index 00000000000..cd0130cacdf
|
||||
--- /dev/null
|
||||
+++ b/ld/testsuite/ld-plugin/pr33246.c
|
||||
@@ -0,0 +1,4 @@
|
||||
+void
|
||||
+foo (void)
|
||||
+{
|
||||
+}
|
||||
diff --git a/libctf/configure b/libctf/configure
|
||||
index 7466d56a18b..89c99c2ddbf 100755
|
||||
--- a/libctf/configure
|
||||
|
14
debian/patches/gas-sframe-warn.diff
vendored
14
debian/patches/gas-sframe-warn.diff
vendored
@@ -1,6 +1,18 @@
|
||||
--- a/gas/gen-sframe.c
|
||||
+++ b/gas/gen-sframe.c
|
||||
@@ -1586,8 +1586,10 @@ sframe_xlate_do_cfi_escape (const struct
|
||||
@@ -1022,9 +1022,11 @@ sframe_xlate_do_def_cfa (struct sframe_x
|
||||
if (cfi_insn->u.ri.reg != SFRAME_CFA_SP_REG
|
||||
&& cfi_insn->u.ri.reg != SFRAME_CFA_FP_REG)
|
||||
{
|
||||
+ /* Disabled for Debian/Ubuntu, shows up in autopkg tests:
|
||||
as_warn (_("no SFrame FDE emitted; "
|
||||
"non-SP/FP register %u in .cfi_def_cfa"),
|
||||
cfi_insn->u.ri.reg);
|
||||
+ */
|
||||
return SFRAME_XLATE_ERR_NOTREPRESENTED; /* Not represented. */
|
||||
}
|
||||
sframe_fre_set_cfa_base_reg (cur_fre, cfi_insn->u.ri.reg);
|
||||
@@ -1586,8 +1588,10 @@ sframe_xlate_do_cfi_escape (const struct
|
||||
OS-specific CFI opcodes), skip inspecting the DWARF expression.
|
||||
This may impact the asynchronicity due to loss of coverage.
|
||||
Continue to warn the user and bail out. */
|
||||
|
Reference in New Issue
Block a user