Revert "gcc-toolset-12-binutils package is retired on branch c10s for CS-2551"
This reverts commit 7fb5f232e8
.
This commit is contained in:
parent
7fb5f232e8
commit
6ce42319ba
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
SOURCES/binutils-2.38.tar.xz
|
||||
/binutils-2.38.tar.xz
|
@ -1,3 +0,0 @@
|
||||
# Package Not Available
|
||||
This package is not available on CentOS Stream 10.
|
||||
It may be available on another branch.
|
38
binutils-2.19.50.0.1-output-format.sed
Normal file
38
binutils-2.19.50.0.1-output-format.sed
Normal file
@ -0,0 +1,38 @@
|
||||
# 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
|
11
binutils-2.27-aarch64-ifunc.patch
Normal file
11
binutils-2.27-aarch64-ifunc.patch
Normal file
@ -0,0 +1,11 @@
|
||||
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;
|
15
binutils-CVE-2019-1010204.patch
Normal file
15
binutils-CVE-2019-1010204.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- binutils.orig/gold/fileread.cc 2019-08-06 14:22:08.669313110 +0100
|
||||
+++ binutils-2.32/gold/fileread.cc 2019-08-06 14:22:28.799177543 +0100
|
||||
@@ -381,6 +381,12 @@ File_read::do_read(off_t start, section_
|
||||
ssize_t bytes;
|
||||
if (this->whole_file_view_ != NULL)
|
||||
{
|
||||
+ // See PR 23765 for an example of a testcase that triggers this error.
|
||||
+ if (((ssize_t) start) < 0)
|
||||
+ gold_fatal(_("%s: read failed, starting offset (%#llx) less than zero"),
|
||||
+ this->filename().c_str(),
|
||||
+ static_cast<long long>(start));
|
||||
+
|
||||
bytes = this->size_ - start;
|
||||
if (static_cast<section_size_type>(bytes) >= size)
|
||||
{
|
11
binutils-autoconf-version.patch
Normal file
11
binutils-autoconf-version.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- 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
|
147
binutils-bfd-DWARF-improvements.patch
Normal file
147
binutils-bfd-DWARF-improvements.patch
Normal file
@ -0,0 +1,147 @@
|
||||
--- binutils.orig/bfd/dwarf2.c 2022-05-16 16:40:15.590519654 +0100
|
||||
+++ binutils-2.38/bfd/dwarf2.c 2022-05-16 16:45:31.824590450 +0100
|
||||
@@ -3291,6 +3291,36 @@ lookup_var_by_offset (bfd_uint64_t offse
|
||||
}
|
||||
|
||||
|
||||
+static struct funcinfo *
|
||||
+reverse_funcinfo_list (struct funcinfo *head)
|
||||
+{
|
||||
+ struct funcinfo *rhead;
|
||||
+ struct funcinfo *temp;
|
||||
+
|
||||
+ for (rhead = NULL; head; head = temp)
|
||||
+ {
|
||||
+ temp = head->prev_func;
|
||||
+ head->prev_func = rhead;
|
||||
+ rhead = head;
|
||||
+ }
|
||||
+ return rhead;
|
||||
+}
|
||||
+
|
||||
+static struct varinfo *
|
||||
+reverse_varinfo_list (struct varinfo *head)
|
||||
+{
|
||||
+ struct varinfo *rhead;
|
||||
+ struct varinfo *temp;
|
||||
+
|
||||
+ for (rhead = NULL; head; head = temp)
|
||||
+ {
|
||||
+ temp = head->prev_var;
|
||||
+ head->prev_var = rhead;
|
||||
+ rhead = head;
|
||||
+ }
|
||||
+ return rhead;
|
||||
+}
|
||||
+
|
||||
/* DWARF2 Compilation unit functions. */
|
||||
|
||||
/* Scan over each die in a comp. unit looking for functions to add
|
||||
@@ -3308,6 +3338,8 @@ scan_unit_for_symbols (struct comp_unit
|
||||
struct funcinfo *func;
|
||||
} *nested_funcs;
|
||||
int nested_funcs_size;
|
||||
+ struct funcinfo *last_func;
|
||||
+ struct varinfo *last_var;
|
||||
|
||||
/* Maintain a stack of in-scope functions and inlined functions, which we
|
||||
can use to set the caller_func field. */
|
||||
@@ -3442,10 +3474,16 @@ scan_unit_for_symbols (struct comp_unit
|
||||
}
|
||||
}
|
||||
|
||||
+ unit->function_table = reverse_funcinfo_list (unit->function_table);
|
||||
+ unit->variable_table = reverse_varinfo_list (unit->variable_table);
|
||||
+
|
||||
/* This is the second pass over the abbrevs. */
|
||||
info_ptr = unit->first_child_die_ptr;
|
||||
nesting_level = 0;
|
||||
|
||||
+ last_func = NULL;
|
||||
+ last_var = NULL;
|
||||
+
|
||||
while (nesting_level >= 0)
|
||||
{
|
||||
unsigned int abbrev_number, i;
|
||||
@@ -3481,16 +3519,32 @@ scan_unit_for_symbols (struct comp_unit
|
||||
|| abbrev->tag == DW_TAG_entry_point
|
||||
|| abbrev->tag == DW_TAG_inlined_subroutine)
|
||||
{
|
||||
- func = lookup_func_by_offset (current_offset, unit->function_table);
|
||||
+ if (last_func
|
||||
+ && last_func->prev_func
|
||||
+ && last_func->prev_func->unit_offset == current_offset)
|
||||
+ func = last_func->prev_func;
|
||||
+ else
|
||||
+ func = lookup_func_by_offset (current_offset, unit->function_table);
|
||||
+
|
||||
if (func == NULL)
|
||||
goto fail;
|
||||
+
|
||||
+ last_func = func;
|
||||
}
|
||||
else if (abbrev->tag == DW_TAG_variable
|
||||
|| abbrev->tag == DW_TAG_member)
|
||||
{
|
||||
- var = lookup_var_by_offset (current_offset, unit->variable_table);
|
||||
+ if (last_var
|
||||
+ && last_var->prev_var
|
||||
+ && last_var->prev_var->unit_offset == current_offset)
|
||||
+ var = last_var->prev_var;
|
||||
+ else
|
||||
+ var = lookup_var_by_offset (current_offset, unit->variable_table);
|
||||
+
|
||||
if (var == NULL)
|
||||
goto fail;
|
||||
+
|
||||
+ last_var = var;
|
||||
}
|
||||
|
||||
for (i = 0; i < abbrev->num_attrs; ++i)
|
||||
@@ -3684,6 +3738,9 @@ scan_unit_for_symbols (struct comp_unit
|
||||
}
|
||||
}
|
||||
|
||||
+ unit->function_table = reverse_funcinfo_list (unit->function_table);
|
||||
+ unit->variable_table = reverse_varinfo_list (unit->variable_table);
|
||||
+
|
||||
free (nested_funcs);
|
||||
return true;
|
||||
|
||||
@@ -4047,36 +4104,6 @@ comp_unit_find_line (struct comp_unit *u
|
||||
linenumber_ptr);
|
||||
}
|
||||
|
||||
-static struct funcinfo *
|
||||
-reverse_funcinfo_list (struct funcinfo *head)
|
||||
-{
|
||||
- struct funcinfo *rhead;
|
||||
- struct funcinfo *temp;
|
||||
-
|
||||
- for (rhead = NULL; head; head = temp)
|
||||
- {
|
||||
- temp = head->prev_func;
|
||||
- head->prev_func = rhead;
|
||||
- rhead = head;
|
||||
- }
|
||||
- return rhead;
|
||||
-}
|
||||
-
|
||||
-static struct varinfo *
|
||||
-reverse_varinfo_list (struct varinfo *head)
|
||||
-{
|
||||
- struct varinfo *rhead;
|
||||
- struct varinfo *temp;
|
||||
-
|
||||
- for (rhead = NULL; head; head = temp)
|
||||
- {
|
||||
- temp = head->prev_var;
|
||||
- head->prev_var = rhead;
|
||||
- rhead = head;
|
||||
- }
|
||||
- return rhead;
|
||||
-}
|
||||
-
|
||||
/* Extract all interesting funcinfos and varinfos of a compilation
|
||||
unit into hash tables for faster lookup. Returns TRUE if no
|
||||
errors were enountered; FALSE otherwise. */
|
83
binutils-do-not-link-with-static-libstdc++.patch
Normal file
83
binutils-do-not-link-with-static-libstdc++.patch
Normal file
@ -0,0 +1,83 @@
|
||||
diff -rup binutils.orig/configure binutils-2.30/configure
|
||||
--- binutils.orig/configure 2018-09-24 17:50:06.967172922 +0100
|
||||
+++ binutils-2.30/configure 2018-09-24 17:51:16.648624865 +0100
|
||||
@@ -4996,49 +4996,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.30/configure.ac
|
||||
--- binutils.orig/configure.ac 2018-09-24 17:50:07.241170767 +0100
|
||||
+++ binutils-2.30/configure.ac 2018-09-24 17:50:29.908992486 +0100
|
||||
@@ -1288,26 +1288,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_CMP_IGNORE_INITIAL
|
||||
|
258
binutils-do-not-use-debuginfod.patch
Normal file
258
binutils-do-not-use-debuginfod.patch
Normal file
@ -0,0 +1,258 @@
|
||||
diff -rup binutils.orig/binutils/NEWS binutils-2.38/binutils/NEWS
|
||||
--- binutils.orig/binutils/NEWS 2022-03-10 09:13:18.284641005 +0000
|
||||
+++ binutils-2.38/binutils/NEWS 2022-03-10 09:13:26.007586352 +0000
|
||||
@@ -1,5 +1,8 @@
|
||||
-*- text -*-
|
||||
|
||||
+* Add an option to objdump and readelf to prevent attempts to access debuginfod
|
||||
+ servers when following links.
|
||||
+
|
||||
Changes in 2.38:
|
||||
|
||||
* elfedit: Add --output-abiversion option to update ABIVERSION.
|
||||
diff -rup binutils.orig/binutils/doc/binutils.texi binutils-2.38/binutils/doc/binutils.texi
|
||||
--- binutils.orig/binutils/doc/binutils.texi 2022-03-10 09:13:18.285640998 +0000
|
||||
+++ binutils-2.38/binutils/doc/binutils.texi 2022-03-10 09:13:26.009586338 +0000
|
||||
@@ -2246,6 +2246,8 @@ objdump [@option{-a}|@option{--archive-h
|
||||
@option{--dwarf}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links]]
|
||||
[@option{-WK}|@option{--dwarf=follow-links}]
|
||||
[@option{-WN}|@option{--dwarf=no-follow-links}]
|
||||
+ [@option{-wD}|@option{--dwarf=use-debuginfod}]
|
||||
+ [@option{-wE}|@option{--dwarf=do-not-use-debuginfod}]
|
||||
[@option{-L}|@option{--process-links}]
|
||||
[@option{--ctf=}@var{section}]
|
||||
[@option{-G}|@option{--stabs}]
|
||||
@@ -4879,6 +4881,8 @@ readelf [@option{-a}|@option{--all}]
|
||||
@option{--debug-dump}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links]]
|
||||
[@option{-wK}|@option{--debug-dump=follow-links}]
|
||||
[@option{-wN}|@option{--debug-dump=no-follow-links}]
|
||||
+ [@option{-wD}|@option{--debug-dump=use-debuginfod}]
|
||||
+ [@option{-wE}|@option{--debug-dump=do-not-use-debuginfod}]
|
||||
[@option{-P}|@option{--process-links}]
|
||||
[@option{--dwarf-depth=@var{n}}]
|
||||
[@option{--dwarf-start=@var{n}}]
|
||||
@@ -5504,7 +5508,8 @@ deduced from the input file
|
||||
@cindex separate debug files
|
||||
|
||||
debuginfod is a web service that indexes ELF/DWARF debugging resources
|
||||
-by build-id and serves them over HTTP.
|
||||
+by build-id and serves them over HTTP. For more information see:
|
||||
+@emph{https://sourceware.org/elfutils/Debuginfod.html}
|
||||
|
||||
Binutils can be built with the debuginfod client library
|
||||
@code{libdebuginfod} using the @option{--with-debuginfod} configure option.
|
||||
@@ -5516,6 +5521,10 @@ separate debug files when the files are
|
||||
debuginfod is packaged with elfutils, starting with version 0.178.
|
||||
You can get the latest version from `https://sourceware.org/elfutils/'.
|
||||
|
||||
+The DWARF info dumping tools (@command{readelf} and @command{objdump})
|
||||
+have options to control when they should access the debuginfod
|
||||
+servers. By default this access is enabled.
|
||||
+
|
||||
@node Reporting Bugs
|
||||
@chapter Reporting Bugs
|
||||
@cindex bugs
|
||||
Only in binutils-2.38/binutils/doc: binutils.texi.orig
|
||||
diff -rup binutils.orig/binutils/doc/debug.options.texi binutils-2.38/binutils/doc/debug.options.texi
|
||||
--- binutils.orig/binutils/doc/debug.options.texi 2022-03-10 09:13:18.285640998 +0000
|
||||
+++ binutils-2.38/binutils/doc/debug.options.texi 2022-03-10 09:13:26.009586338 +0000
|
||||
@@ -68,10 +68,27 @@ chosen when configuring the binutils via
|
||||
@option{--enable-follow-debug-links=no} options. If these are not
|
||||
used then the default is to enable the following of debug links.
|
||||
|
||||
+Note - if support for the debuginfod protocol was enabled when the
|
||||
+binutils were built then this option will also include an attempt to
|
||||
+contact any debuginfod servers mentioned in the @var{DEBUGINFOD_URLS}
|
||||
+environment variable. This could take some time to resolve. This
|
||||
+behaviour can be disabled via the @option{=do-not-use-debuginfod} debug
|
||||
+option.
|
||||
+
|
||||
@item N
|
||||
@itemx =no-follow-links
|
||||
Disables the following of links to separate debug info files.
|
||||
|
||||
+@item D
|
||||
+@itemx =use-debuginfod
|
||||
+Enables contacting debuginfod servers if there is a need to follow
|
||||
+debug links. This is the default behaviour.
|
||||
+
|
||||
+@item E
|
||||
+@itemx =do-not-use-debuginfod
|
||||
+Disables contacting debuginfod servers when there is a need to follow
|
||||
+debug links.
|
||||
+
|
||||
@item l
|
||||
@itemx =rawline
|
||||
Displays the contents of the @samp{.debug_line} section in a raw
|
||||
diff -rup binutils.orig/binutils/dwarf.c binutils-2.38/binutils/dwarf.c
|
||||
--- binutils.orig/binutils/dwarf.c 2022-03-10 09:13:18.283641012 +0000
|
||||
+++ binutils-2.38/binutils/dwarf.c 2022-03-10 09:13:26.010586331 +0000
|
||||
@@ -109,6 +109,9 @@ int do_debug_cu_index;
|
||||
int do_wide;
|
||||
int do_debug_links;
|
||||
int do_follow_links = DEFAULT_FOR_FOLLOW_LINKS;
|
||||
+#ifdef HAVE_LIBDEBUGINFOD
|
||||
+int use_debuginfod = 1;
|
||||
+#endif
|
||||
bool do_checks;
|
||||
|
||||
int dwarf_cutoff_level = -1;
|
||||
@@ -11038,7 +11041,7 @@ debuginfod_fetch_separate_debug_info (st
|
||||
|
||||
return false;
|
||||
}
|
||||
-#endif
|
||||
+#endif /* HAVE_LIBDEBUGINFOD */
|
||||
|
||||
static void *
|
||||
load_separate_debug_info (const char * main_filename,
|
||||
@@ -11157,9 +11160,10 @@ load_separate_debug_info (const char *
|
||||
{
|
||||
char * tmp_filename;
|
||||
|
||||
- if (debuginfod_fetch_separate_debug_info (xlink,
|
||||
- & tmp_filename,
|
||||
- file))
|
||||
+ if (use_debuginfod
|
||||
+ && debuginfod_fetch_separate_debug_info (xlink,
|
||||
+ & tmp_filename,
|
||||
+ file))
|
||||
{
|
||||
/* File successfully downloaded from server, replace
|
||||
debug_filename with the file's path. */
|
||||
@@ -11207,13 +11211,15 @@ load_separate_debug_info (const char *
|
||||
warn (_("tried: %s\n"), debug_filename);
|
||||
|
||||
#if HAVE_LIBDEBUGINFOD
|
||||
- {
|
||||
- char *urls = getenv (DEBUGINFOD_URLS_ENV_VAR);
|
||||
- if (urls == NULL)
|
||||
- urls = "";
|
||||
+ if (use_debuginfod)
|
||||
+ {
|
||||
+ char *urls = getenv (DEBUGINFOD_URLS_ENV_VAR);
|
||||
|
||||
- warn (_("tried: DEBUGINFOD_URLS=%s\n"), urls);
|
||||
- }
|
||||
+ if (urls == NULL)
|
||||
+ urls = "";
|
||||
+
|
||||
+ warn (_("tried: DEBUGINFOD_URLS=%s\n"), urls);
|
||||
+ }
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -11707,6 +11713,9 @@ dwarf_select_sections_by_names (const ch
|
||||
{ "aranges", & do_debug_aranges, 1 },
|
||||
{ "cu_index", & do_debug_cu_index, 1 },
|
||||
{ "decodedline", & do_debug_lines, FLAG_DEBUG_LINES_DECODED },
|
||||
+#ifdef HAVE_LIBDEBUGINFOD
|
||||
+ { "do-not-use-debuginfod", & use_debuginfod, 0 },
|
||||
+#endif
|
||||
{ "follow-links", & do_follow_links, 1 },
|
||||
{ "frames", & do_debug_frames, 1 },
|
||||
{ "frames-interp", & do_debug_frames_interp, 1 },
|
||||
@@ -11730,6 +11739,9 @@ dwarf_select_sections_by_names (const ch
|
||||
{ "trace_abbrev", & do_trace_abbrevs, 1 },
|
||||
{ "trace_aranges", & do_trace_aranges, 1 },
|
||||
{ "trace_info", & do_trace_info, 1 },
|
||||
+#ifdef HAVE_LIBDEBUGINFOD
|
||||
+ { "use-debuginfod", & use_debuginfod, 1 },
|
||||
+#endif
|
||||
{ NULL, NULL, 0 }
|
||||
};
|
||||
|
||||
@@ -11783,6 +11795,10 @@ dwarf_select_sections_by_letters (const
|
||||
case 'A': do_debug_addr = 1; break;
|
||||
case 'a': do_debug_abbrevs = 1; break;
|
||||
case 'c': do_debug_cu_index = 1; break;
|
||||
+#ifdef HAVE_LIBDEBUGINFOD
|
||||
+ case 'D': use_debuginfod = 1; break;
|
||||
+ case 'E': use_debuginfod = 0; break;
|
||||
+#endif
|
||||
case 'F': do_debug_frames_interp = 1; /* Fall through. */
|
||||
case 'f': do_debug_frames = 1; break;
|
||||
case 'g': do_gdb_index = 1; break;
|
||||
diff -rup binutils.orig/binutils/dwarf.h binutils-2.38/binutils/dwarf.h
|
||||
--- binutils.orig/binutils/dwarf.h 2022-03-10 09:13:18.284641005 +0000
|
||||
+++ binutils-2.38/binutils/dwarf.h 2022-03-10 09:13:26.010586331 +0000
|
||||
@@ -224,6 +224,9 @@ extern int do_debug_cu_index;
|
||||
extern int do_wide;
|
||||
extern int do_debug_links;
|
||||
extern int do_follow_links;
|
||||
+#ifdef HAVE_LIBDEBUGINFOD
|
||||
+extern int use_debuginfod;
|
||||
+#endif
|
||||
extern bool do_checks;
|
||||
|
||||
extern int dwarf_cutoff_level;
|
||||
diff -rup binutils.orig/binutils/objdump.c binutils-2.38/binutils/objdump.c
|
||||
--- binutils.orig/binutils/objdump.c 2022-03-10 09:13:18.283641012 +0000
|
||||
+++ binutils-2.38/binutils/objdump.c 2022-03-10 09:13:26.011586324 +0000
|
||||
@@ -281,6 +281,14 @@ usage (FILE *stream, int status)
|
||||
Do not follow links to separate debug info files\n\
|
||||
(default)\n"));
|
||||
#endif
|
||||
+#if HAVE_LIBDEBUGINFOD
|
||||
+ fprintf (stream, _("\
|
||||
+ -WD --dwarf=use-debuginfod\n\
|
||||
+ When following links, also query debuginfod servers (default)\n"));
|
||||
+ fprintf (stream, _("\
|
||||
+ -WE --dwarf=do-not-use-debuginfod\n\
|
||||
+ When following links, do not query debuginfod servers\n"));
|
||||
+#endif
|
||||
fprintf (stream, _("\
|
||||
-L, --process-links Display the contents of non-debug sections in\n\
|
||||
separate debuginfo files. (Implies -WK)\n"));
|
||||
Only in binutils-2.38/binutils/: objdump.c.orig
|
||||
diff -rup binutils.orig/binutils/readelf.c binutils-2.38/binutils/readelf.c
|
||||
--- binutils.orig/binutils/readelf.c 2022-03-10 09:13:18.302640878 +0000
|
||||
+++ binutils-2.38/binutils/readelf.c 2022-03-10 09:13:26.012586316 +0000
|
||||
@@ -5126,6 +5126,14 @@ usage (FILE * stream)
|
||||
Do not follow links to separate debug info files\n\
|
||||
(default)\n"));
|
||||
#endif
|
||||
+#if HAVE_LIBDEBUGINFOD
|
||||
+ fprintf (stream, _("\
|
||||
+ -wD --debug-dump=use-debuginfod\n\
|
||||
+ When following links, also query debuginfod servers (default)\n"));
|
||||
+ fprintf (stream, _("\
|
||||
+ -wE --debug-dump=do-not-use-debuginfod\n\
|
||||
+ When following links, do not query debuginfod servers\n"));
|
||||
+#endif
|
||||
fprintf (stream, _("\
|
||||
--dwarf-depth=N Do not display DIEs at depth N or greater\n"));
|
||||
fprintf (stream, _("\
|
||||
Only in binutils-2.38/binutils/: readelf.c.orig
|
||||
diff -rup binutils.orig/binutils/testsuite/binutils-all/debuginfod.exp binutils-2.38/binutils/testsuite/binutils-all/debuginfod.exp
|
||||
--- binutils.orig/binutils/testsuite/binutils-all/debuginfod.exp 2022-03-10 09:13:18.291640956 +0000
|
||||
+++ binutils-2.38/binutils/testsuite/binutils-all/debuginfod.exp 2022-03-10 09:13:26.012586316 +0000
|
||||
@@ -185,8 +185,14 @@ proc test_fetch_debugaltlink { prog prog
|
||||
}
|
||||
|
||||
if { [regexp ".*DEBUGINFOD.*" $conf_objdump] } {
|
||||
- test_fetch_debuglink $OBJDUMP "-W"
|
||||
+ test_fetch_debuglink $OBJDUMP "-W -WD"
|
||||
test_fetch_debugaltlink $OBJDUMP "-Wk"
|
||||
+
|
||||
+ set test "disabling debuginfod access"
|
||||
+ setup_xfail *-*-*
|
||||
+ test_fetch_debuglink $OBJDUMP "-W -WE"
|
||||
+ set test "debuginfod"
|
||||
+
|
||||
} else {
|
||||
untested "$test (objdump not configured with debuginfod)"
|
||||
}
|
||||
@@ -194,6 +200,12 @@ if { [regexp ".*DEBUGINFOD.*" $conf_objd
|
||||
if { [regexp ".*DEBUGINFOD.*" $conf_readelf] } {
|
||||
test_fetch_debuglink $READELF "-w"
|
||||
test_fetch_debugaltlink $READELF "-wk"
|
||||
+
|
||||
+ set test "disabling debuginfod access"
|
||||
+ setup_xfail *-*-*
|
||||
+ test_fetch_debuglink $READELF "-w -wE"
|
||||
+ set test "debuginfod"
|
||||
+
|
||||
} else {
|
||||
untested "$test (readelf not configured with debuginfod)"
|
||||
}
|
33
binutils-export-demangle.h.patch
Normal file
33
binutils-export-demangle.h.patch
Normal file
@ -0,0 +1,33 @@
|
||||
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
|
134
binutils-filename-in-error-messages.patch
Normal file
134
binutils-filename-in-error-messages.patch
Normal file
@ -0,0 +1,134 @@
|
||||
--- binutils.orig/binutils/readelf.c 2021-07-19 12:39:14.206556025 +0100
|
||||
+++ binutils-2.37/binutils/readelf.c 2021-07-19 12:44:37.712728732 +0100
|
||||
@@ -21873,45 +21873,52 @@ process_file (char * file_name)
|
||||
struct stat statbuf;
|
||||
char armag[SARMAG];
|
||||
bool ret = true;
|
||||
+ 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 = (bfd_size_type) statbuf.st_size;
|
||||
@@ -21919,33 +21926,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;
|
||||
--- binutils.orig/binutils/readelf.c 2021-08-10 10:15:22.088016072 +0100
|
||||
+++ binutils-2.37/binutils/readelf.c 2021-08-10 10:15:55.567907891 +0100
|
||||
@@ -21884,7 +21884,7 @@ 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;
|
||||
|
330
binutils-fix-testsuite-failures.patch
Normal file
330
binutils-fix-testsuite-failures.patch
Normal file
@ -0,0 +1,330 @@
|
||||
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"
|
91
binutils-gas-loc-view.patch
Normal file
91
binutils-gas-loc-view.patch
Normal file
@ -0,0 +1,91 @@
|
||||
diff -rup binutils.orig/gas/symbols.c binutils-2.38/gas/symbols.c
|
||||
--- binutils.orig/gas/symbols.c 2022-03-09 11:43:34.706610216 +0000
|
||||
+++ binutils-2.38/gas/symbols.c 2022-03-09 11:45:57.540686508 +0000
|
||||
@@ -61,8 +61,10 @@ struct symbol_flags
|
||||
/* Whether the symbol can be re-defined. */
|
||||
unsigned int volatil : 1;
|
||||
|
||||
- /* Whether the symbol is a forward reference. */
|
||||
+ /* Whether the symbol is a forward reference, and whether such has
|
||||
+ been determined. */
|
||||
unsigned int forward_ref : 1;
|
||||
+ unsigned int forward_resolved : 1;
|
||||
|
||||
/* This is set if the symbol is defined in an MRI common section.
|
||||
We handle such sections as single common symbols, so symbols
|
||||
@@ -202,7 +204,7 @@ static void *
|
||||
symbol_entry_find (htab_t table, const char *name)
|
||||
{
|
||||
hashval_t hash = htab_hash_string (name);
|
||||
- symbol_entry_t needle = { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
+ symbol_entry_t needle = { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
|
||||
hash, name, 0, 0, 0 } };
|
||||
return htab_find_with_hash (table, &needle, hash);
|
||||
}
|
||||
@@ -784,7 +786,9 @@ symbol_clone (symbolS *orgsymP, int repl
|
||||
symbolS *
|
||||
symbol_clone_if_forward_ref (symbolS *symbolP, int is_forward)
|
||||
{
|
||||
- if (symbolP && !symbolP->flags.local_symbol)
|
||||
+ if (symbolP
|
||||
+ && !symbolP->flags.local_symbol
|
||||
+ && !symbolP->flags.forward_resolved)
|
||||
{
|
||||
symbolS *orig_add_symbol = symbolP->x->value.X_add_symbol;
|
||||
symbolS *orig_op_symbol = symbolP->x->value.X_op_symbol;
|
||||
@@ -837,6 +841,7 @@ symbol_clone_if_forward_ref (symbolS *sy
|
||||
|
||||
symbolP->x->value.X_add_symbol = add_symbol;
|
||||
symbolP->x->value.X_op_symbol = op_symbol;
|
||||
+ symbolP->flags.forward_resolved = 1;
|
||||
}
|
||||
|
||||
return symbolP;
|
||||
diff -rup binutils.orig/gas/testsuite/gas/elf/dwarf2-18.d binutils-2.38/gas/testsuite/gas/elf/dwarf2-18.d
|
||||
--- binutils.orig/gas/testsuite/gas/elf/dwarf2-18.d 2022-03-09 11:43:34.487611632 +0000
|
||||
+++ binutils-2.38/gas/testsuite/gas/elf/dwarf2-18.d 2022-03-09 11:48:03.298873228 +0000
|
||||
@@ -2,9 +2,8 @@
|
||||
#readelf: -x.rodata -wL
|
||||
#name: DWARF2 18
|
||||
# The am33 cr16 crx ft32 mn10 msp430 nds32 and rl78 targets do not evaluate the subtraction of symbols at assembly time.
|
||||
-# The mep targets turns some view computations into complex relocations.
|
||||
# The riscv targets do not support the subtraction of symbols.
|
||||
-#xfail: am3*-* cr16-* crx-* ft32*-* mep-* mn10*-* msp430-* nds32*-* riscv*-* rl78-*
|
||||
+#xfail: am3*-* cr16-* crx-* ft32*-* mn10*-* msp430-* nds32*-* riscv*-* rl78-*
|
||||
|
||||
Hex dump of section '\.rodata':
|
||||
0x00000000 0100 *.*
|
||||
--- binutils.orig/gas/dwarf2dbg.c 2022-03-10 09:13:18.516639363 +0000
|
||||
+++ binutils-2.38/gas/dwarf2dbg.c 2022-03-10 12:45:25.191933733 +0000
|
||||
@@ -402,18 +402,27 @@ set_or_check_view (struct line_entry *e,
|
||||
if (viewx.X_op != O_constant || viewx.X_add_number)
|
||||
{
|
||||
expressionS incv;
|
||||
+ expressionS *p_view;
|
||||
|
||||
if (!p->loc.u.view)
|
||||
- {
|
||||
- p->loc.u.view = symbol_temp_make ();
|
||||
- gas_assert (!S_IS_DEFINED (p->loc.u.view));
|
||||
- }
|
||||
+ p->loc.u.view = symbol_temp_make ();
|
||||
|
||||
memset (&incv, 0, sizeof (incv));
|
||||
incv.X_unsigned = 1;
|
||||
incv.X_op = O_symbol;
|
||||
incv.X_add_symbol = p->loc.u.view;
|
||||
incv.X_add_number = 1;
|
||||
+ p_view = symbol_get_value_expression (p->loc.u.view);
|
||||
+ if (p_view->X_op == O_constant || p_view->X_op == O_symbol)
|
||||
+ {
|
||||
+ /* If we can, constant fold increments so that a chain of
|
||||
+ expressions v + 1 + 1 ... + 1 is not created.
|
||||
+ resolve_expression isn't ideal for this purpose. The
|
||||
+ base v might not be resolvable until later. */
|
||||
+ incv.X_op = p_view->X_op;
|
||||
+ incv.X_add_symbol = p_view->X_add_symbol;
|
||||
+ incv.X_add_number = p_view->X_add_number + 1;
|
||||
+ }
|
||||
|
||||
if (viewx.X_op == O_constant)
|
||||
{
|
193
binutils-gold-i386-gnu-property-notes.patch
Normal file
193
binutils-gold-i386-gnu-property-notes.patch
Normal file
@ -0,0 +1,193 @@
|
||||
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.
|
19
binutils-gold-mismatched-section-flags.patch
Normal file
19
binutils-gold-mismatched-section-flags.patch
Normal file
@ -0,0 +1,19 @@
|
||||
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)
|
66
binutils-gold-warn-unsupported.patch
Normal file
66
binutils-gold-warn-unsupported.patch
Normal file
@ -0,0 +1,66 @@
|
||||
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
|
||||
;;
|
14
binutils-indirect-symbols.patch
Normal file
14
binutils-indirect-symbols.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- binutils.orig/bfd/elflink.c 2022-03-30 11:44:05.686040593 +0100
|
||||
+++ binutils-2.38/bfd/elflink.c 2022-03-30 11:45:18.066541463 +0100
|
||||
@@ -1294,9 +1294,8 @@ _bfd_elf_merge_symbol (bfd *abfd,
|
||||
h->root.non_ir_ref_dynamic = true;
|
||||
hi->root.non_ir_ref_dynamic = true;
|
||||
}
|
||||
-
|
||||
- if ((oldbfd->flags & BFD_PLUGIN) != 0
|
||||
- && hi->root.type == bfd_link_hash_indirect)
|
||||
+ else if ((oldbfd->flags & BFD_PLUGIN) != 0
|
||||
+ && hi->root.type == bfd_link_hash_indirect)
|
||||
{
|
||||
/* Change indirect symbol from IR to undefined. */
|
||||
hi->root.type = bfd_link_hash_undefined;
|
236
binutils-libtool-lib64.patch
Normal file
236
binutils-libtool-lib64.patch
Normal file
@ -0,0 +1,236 @@
|
||||
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
|
28
binutils-no-config-h-check.patch
Normal file
28
binutils-no-config-h-check.patch
Normal file
@ -0,0 +1,28 @@
|
||||
--- 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
|
35
binutils-readelf-other-sym-info.patch
Normal file
35
binutils-readelf-other-sym-info.patch
Normal file
@ -0,0 +1,35 @@
|
||||
--- binutils.orig/binutils/readelf.c 2020-07-24 15:08:30.317597020 +0100
|
||||
+++ binutils-2.35/binutils/readelf.c 2020-07-24 15:09:39.029155552 +0100
|
||||
@@ -12069,11 +12069,13 @@ print_dynamic_symbol (Filedata *filedata
|
||||
unsigned int vis = ELF_ST_VISIBILITY (psym->st_other);
|
||||
|
||||
printf (" %-7s", get_symbol_visibility (vis));
|
||||
+#if 0
|
||||
/* Check to see if any other bits in the st_other field are set.
|
||||
Note - displaying this information disrupts the layout of the
|
||||
table being generated, but for the moment this case is very rare. */
|
||||
if (psym->st_other ^ vis)
|
||||
printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis));
|
||||
+#endif
|
||||
}
|
||||
printf (" %4s ", get_symbol_index_type (filedata, psym->st_shndx));
|
||||
|
||||
@@ -12112,7 +12114,17 @@ print_dynamic_symbol (Filedata *filedata
|
||||
version_string);
|
||||
}
|
||||
|
||||
- putchar ('\n');
|
||||
+#if 1
|
||||
+ {
|
||||
+ unsigned int vis = ELF_ST_VISIBILITY (psym->st_other);
|
||||
+
|
||||
+ /* Check to see if any other bits in the st_other field are set. */
|
||||
+ if (psym->st_other ^ vis)
|
||||
+ printf (" \t[%s]", get_symbol_other (filedata, psym->st_other ^ vis));
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ putchar ('\n');
|
||||
|
||||
if (ELF_ST_BIND (psym->st_info) == STB_LOCAL
|
||||
&& section != NULL
|
243
binutils-revert-PLT-elision.patch
Normal file
243
binutils-revert-PLT-elision.patch
Normal file
@ -0,0 +1,243 @@
|
||||
diff -rup binutils.orig/ld/testsuite/ld-i386/pltgot-1.d binutils-2.29.1/ld/testsuite/ld-i386/pltgot-1.d
|
||||
--- binutils.orig/ld/testsuite/ld-i386/pltgot-1.d 2017-11-15 13:32:39.335065263 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-i386/pltgot-1.d 2017-11-15 15:03:55.649727195 +0000
|
||||
@@ -2,6 +2,7 @@
|
||||
#readelf: -S --wide
|
||||
#as: --32
|
||||
|
||||
+#pass
|
||||
#...
|
||||
+\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.*
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-i386/pltgot-2.d binutils-2.29.1/ld/testsuite/ld-i386/pltgot-2.d
|
||||
--- binutils.orig/ld/testsuite/ld-i386/pltgot-2.d 2017-11-15 13:32:39.329065335 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-i386/pltgot-2.d 2017-11-15 15:04:20.803430034 +0000
|
||||
@@ -3,7 +3,6 @@
|
||||
#readelf: -d --wide
|
||||
#as: --32
|
||||
|
||||
-#failif
|
||||
#...
|
||||
+0x[0-9a-f]+ +\(PLTREL.*
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-i386/pr19636-2d.d binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2d.d
|
||||
--- binutils.orig/ld/testsuite/ld-i386/pr19636-2d.d 2017-11-15 13:32:39.336065251 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2d.d 2017-11-15 15:03:00.413379749 +0000
|
||||
@@ -9,7 +9,7 @@ Relocation section '\.rel\.dyn' at offse
|
||||
[0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func
|
||||
[0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func
|
||||
[0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func
|
||||
-
|
||||
+#...
|
||||
Symbol table '\.dynsym' contains [0-9]+ entries:
|
||||
+Num: +Value +Size Type +Bind +Vis +Ndx Name
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-i386/pr19636-2e.d binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2e.d
|
||||
--- binutils.orig/ld/testsuite/ld-i386/pr19636-2e.d 2017-11-15 13:32:39.330065323 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-i386/pr19636-2e.d 2017-11-15 15:03:28.928042882 +0000
|
||||
@@ -9,7 +9,7 @@ Relocation section '\.rel\.dyn' at offse
|
||||
[0-9a-f]+ +[0-9a-f]+ +R_386_32 +0+ +func
|
||||
[0-9a-f]+ +[0-9a-f]+ +R_386_PC32 +0+ +func
|
||||
[0-9a-f]+ +[0-9a-f]+ +R_386_GLOB_DAT +0+ +func
|
||||
-
|
||||
+#...
|
||||
Symbol table '\.dynsym' contains [0-9]+ entries:
|
||||
+Num: +Value +Size Type +Bind +Vis +Ndx Name
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pltgot-1.d binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-1.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pltgot-1.d 2017-11-15 13:32:39.415064300 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-1.d 2017-11-15 15:08:39.333375801 +0000
|
||||
@@ -2,8 +2,4 @@
|
||||
#readelf: -S --wide
|
||||
#as: --64
|
||||
|
||||
-#...
|
||||
- +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.*
|
||||
-#...
|
||||
- +\[ *[0-9]+\] \.got\.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+18 +.*
|
||||
#pass
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pltgot-2.d binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-2.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pltgot-2.d 2017-11-15 13:32:39.404064432 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pltgot-2.d 2017-11-15 15:08:59.031143095 +0000
|
||||
@@ -3,7 +3,6 @@
|
||||
#readelf: -d --wide
|
||||
#as: --64
|
||||
|
||||
-#failif
|
||||
#...
|
||||
+0x[0-9a-f]+ +\(PLTREL.*
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 13:32:39.407064397 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 15:06:17.244054423 +0000
|
||||
@@ -1,4 +1,3 @@
|
||||
-#failif
|
||||
#...
|
||||
[0-9a-f ]+R_X86_64_JUMP_SLOT +0+ +bar \+ 0
|
||||
#...
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830a.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830a.d 2017-11-15 13:32:39.412064336 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a.d 2017-11-15 15:15:09.918750288 +0000
|
||||
@@ -20,6 +20,7 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
+#pass
|
||||
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830a-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830a-now.d 2017-11-15 13:32:39.413064324 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830a-now.d 2017-11-15 15:16:08.227055104 +0000
|
||||
@@ -20,6 +20,7 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
+#pass
|
||||
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830b.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830b.d 2017-11-15 13:32:39.413064324 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b.d 2017-11-15 15:16:20.115913358 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr20830b-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr20830b-now.d 2017-11-15 13:32:39.411064348 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr20830b-now.d 2017-11-15 15:16:29.012807282 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000010 0000001c FDE cie=00000000 pc=0000000000000138..0000000000000144
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038a.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038a.d 2017-11-15 13:32:39.408064384 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a.d 2017-11-15 15:19:48.097433680 +0000
|
||||
@@ -19,7 +19,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038a-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038a-now.d 2017-11-15 13:32:39.401064469 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038a-now.d 2017-11-15 15:10:56.077760324 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001c8..00000000000001d4
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038b.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038b.d 2017-11-15 13:32:39.405064420 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b.d 2017-11-15 15:10:42.828916844 +0000
|
||||
@@ -19,6 +19,7 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
+#pass
|
||||
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038b-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038b-now.d 2017-11-15 13:32:39.416064288 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038b-now.d 2017-11-15 15:11:11.550577531 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000001d8..00000000000001dd
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038c.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038c.d 2017-11-15 13:32:39.411064348 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c.d 2017-11-15 15:09:52.664509478 +0000
|
||||
@@ -19,7 +19,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr21038c-now.d binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c-now.d
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/pr21038c-now.d 2017-11-15 13:32:39.413064324 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/pr21038c-now.d 2017-11-15 15:11:22.975442559 +0000
|
||||
@@ -20,7 +20,8 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r16 \(rip\) at cfa-8
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
+
|
||||
0+18 0000000000000014 0000001c FDE cie=00000000 pc=0000000000000220..0000000000000231
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
diff -rup binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.29.1/ld/testsuite/ld-x86-64/tlspic2.rd
|
||||
--- binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd 2017-11-15 13:32:39.417064276 +0000
|
||||
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/tlspic2.rd 2017-11-15 15:05:02.950932110 +0000
|
||||
@@ -14,6 +14,7 @@ Section Headers:
|
||||
+\[[ 0-9]+\] .dynsym +.*
|
||||
+\[[ 0-9]+\] .dynstr +.*
|
||||
+\[[ 0-9]+\] .rela.dyn +.*
|
||||
+#pass
|
||||
+\[[ 0-9]+\] .plt +.*
|
||||
+\[[ 0-9]+\] .plt.got +.*
|
||||
+\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+31a 00 +AX +0 +0 4096
|
||||
--- binutils.orig/bfd/elfxx-x86.c 2018-01-22 15:59:25.875788033 +0000
|
||||
+++ binutils-2.30.0/bfd/elfxx-x86.c 2018-01-22 16:00:20.789146597 +0000
|
||||
@@ -107,7 +107,7 @@ elf_x86_allocate_dynrelocs (struct elf_l
|
||||
plt_entry_size = htab->plt.plt_entry_size;
|
||||
|
||||
resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh);
|
||||
-
|
||||
+#if 0
|
||||
/* We can't use the GOT PLT if pointer equality is needed since
|
||||
finish_dynamic_symbol won't clear symbol value and the dynamic
|
||||
linker won't update the GOT slot. We will get into an infinite
|
||||
@@ -125,7 +125,7 @@ elf_x86_allocate_dynrelocs (struct elf_l
|
||||
/* Use the GOT PLT. */
|
||||
eh->plt_got.refcount = 1;
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
/* Since STT_GNU_IFUNC symbol must go through PLT, we handle it
|
||||
here if it is defined and referenced in a non-shared object. */
|
||||
if (h->type == STT_GNU_IFUNC
|
||||
--- binutils.orig/ld/testsuite/ld-i386/pr20830.d 2018-07-09 09:49:51.277239857 +0100
|
||||
+++ binutils-2.30.90/ld/testsuite/ld-i386/pr20830.d 2018-07-09 10:32:41.113356733 +0100
|
||||
@@ -19,7 +19,7 @@ Contents of the .eh_frame section:
|
||||
DW_CFA_offset: r8 \(eip\) at cfa-4
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
||||
-
|
||||
+#pass
|
||||
0+18 00000010 0000001c FDE cie=00000000 pc=00000128..00000133
|
||||
DW_CFA_nop
|
||||
DW_CFA_nop
|
@ -1 +0,0 @@
|
||||
gcc-toolset-12-binutils package is retired on branch c10s for CS-2551
|
Loading…
Reference in New Issue
Block a user