Compare commits
No commits in common. 'c9' and 'cs10' have entirely different histories.
@ -1 +1 @@
|
|||||||
SOURCES/binutils-2.40.tar.xz
|
SOURCES/binutils-2.41.tar.xz
|
||||||
|
@ -1 +1 @@
|
|||||||
fee4fbef9d632afc1988dd631d7f75d4394b7f8d SOURCES/binutils-2.40.tar.xz
|
0e008260a958bbd10182ee3384672ae0a310eece SOURCES/binutils-2.41.tar.xz
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
diff -rupN --no-dereference binutils-2.40/bfd/elf.c binutils-2.40-new/bfd/elf.c
|
|
||||||
--- binutils-2.40/bfd/elf.c 2023-04-14 16:12:16.185323541 +0200
|
|
||||||
+++ binutils-2.40-new/bfd/elf.c 2023-04-14 16:12:27.583371759 +0200
|
|
||||||
@@ -9048,6 +9048,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd
|
|
||||||
bfd_set_error (bfd_error_file_too_big);
|
|
||||||
goto error_return_verdef;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ if (amt == 0)
|
|
||||||
+ goto error_return_verdef;
|
|
||||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
|
||||||
if (elf_tdata (abfd)->verdef == NULL)
|
|
||||||
goto error_return_verdef;
|
|
||||||
@@ -9151,6 +9154,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd
|
|
||||||
bfd_set_error (bfd_error_file_too_big);
|
|
||||||
goto error_return;
|
|
||||||
}
|
|
||||||
+ if (amt == 0)
|
|
||||||
+ goto error_return;
|
|
||||||
elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt);
|
|
||||||
if (elf_tdata (abfd)->verdef == NULL)
|
|
||||||
goto error_return;
|
|
@ -1,126 +0,0 @@
|
|||||||
diff -rupN --no-dereference binutils-2.40/binutils/readelf.c binutils-2.40-new/binutils/readelf.c
|
|
||||||
--- binutils-2.40/binutils/readelf.c 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/binutils/readelf.c 2023-03-09 14:51:51.335420794 +0100
|
|
||||||
@@ -22858,46 +22858,53 @@ process_file (char * file_name)
|
|
||||||
Filedata * filedata = NULL;
|
|
||||||
struct stat statbuf;
|
|
||||||
char armag[SARMAG];
|
|
||||||
- bool ret = true;
|
|
||||||
+ bool ret = false;
|
|
||||||
+ char * name;
|
|
||||||
+ char * saved_program_name;
|
|
||||||
+
|
|
||||||
+ /* Overload program_name to include file_name. Doing this means
|
|
||||||
+ that warning/error messages will positively identify the file
|
|
||||||
+ concerned even when multiple instances of readelf are running. */
|
|
||||||
+ name = xmalloc (strlen (program_name) + strlen (file_name) + 3);
|
|
||||||
+ sprintf (name, "%s: %s", program_name, file_name);
|
|
||||||
+ saved_program_name = program_name;
|
|
||||||
+ program_name = name;
|
|
||||||
|
|
||||||
if (stat (file_name, &statbuf) < 0)
|
|
||||||
{
|
|
||||||
if (errno == ENOENT)
|
|
||||||
- error (_("'%s': No such file\n"), file_name);
|
|
||||||
+ error (_("No such file\n"));
|
|
||||||
else
|
|
||||||
- error (_("Could not locate '%s'. System error message: %s\n"),
|
|
||||||
- file_name, strerror (errno));
|
|
||||||
- return false;
|
|
||||||
+ error (_("Could not locate file. System error message: %s\n"),
|
|
||||||
+ strerror (errno));
|
|
||||||
+ goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! S_ISREG (statbuf.st_mode))
|
|
||||||
{
|
|
||||||
- error (_("'%s' is not an ordinary file\n"), file_name);
|
|
||||||
- return false;
|
|
||||||
+ error (_("Not an ordinary file\n"));
|
|
||||||
+ goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
filedata = calloc (1, sizeof * filedata);
|
|
||||||
if (filedata == NULL)
|
|
||||||
{
|
|
||||||
error (_("Out of memory allocating file data structure\n"));
|
|
||||||
- return false;
|
|
||||||
+ goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
filedata->file_name = file_name;
|
|
||||||
filedata->handle = fopen (file_name, "rb");
|
|
||||||
if (filedata->handle == NULL)
|
|
||||||
{
|
|
||||||
- error (_("Input file '%s' is not readable.\n"), file_name);
|
|
||||||
- free (filedata);
|
|
||||||
- return false;
|
|
||||||
+ error (_("Not readable\n"));
|
|
||||||
+ goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fread (armag, SARMAG, 1, filedata->handle) != 1)
|
|
||||||
{
|
|
||||||
- error (_("%s: Failed to read file's magic number\n"), file_name);
|
|
||||||
- fclose (filedata->handle);
|
|
||||||
- free (filedata);
|
|
||||||
- return false;
|
|
||||||
+ error (_("Failed to read file's magic number\n"));
|
|
||||||
+ goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
filedata->file_size = statbuf.st_size;
|
|
||||||
@@ -22905,33 +22912,39 @@ process_file (char * file_name)
|
|
||||||
|
|
||||||
if (memcmp (armag, ARMAG, SARMAG) == 0)
|
|
||||||
{
|
|
||||||
- if (! process_archive (filedata, false))
|
|
||||||
- ret = false;
|
|
||||||
+ if (process_archive (filedata, false))
|
|
||||||
+ ret = true;
|
|
||||||
}
|
|
||||||
else if (memcmp (armag, ARMAGT, SARMAG) == 0)
|
|
||||||
{
|
|
||||||
- if ( ! process_archive (filedata, true))
|
|
||||||
- ret = false;
|
|
||||||
+ if (process_archive (filedata, true))
|
|
||||||
+ ret = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (do_archive_index && !check_all)
|
|
||||||
- error (_("File %s is not an archive so its index cannot be displayed.\n"),
|
|
||||||
- file_name);
|
|
||||||
+ error (_("Not an archive so its index cannot be displayed.\n"));
|
|
||||||
|
|
||||||
rewind (filedata->handle);
|
|
||||||
filedata->archive_file_size = filedata->archive_file_offset = 0;
|
|
||||||
|
|
||||||
- if (! process_object (filedata))
|
|
||||||
- ret = false;
|
|
||||||
+ if (process_object (filedata))
|
|
||||||
+ ret = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
- fclose (filedata->handle);
|
|
||||||
- free (filedata->section_headers);
|
|
||||||
- free (filedata->program_headers);
|
|
||||||
- free (filedata->string_table);
|
|
||||||
- free (filedata->dump.dump_sects);
|
|
||||||
- free (filedata);
|
|
||||||
+ done:
|
|
||||||
+ if (filedata)
|
|
||||||
+ {
|
|
||||||
+ if (filedata->handle != NULL)
|
|
||||||
+ fclose (filedata->handle);
|
|
||||||
+ free (filedata->section_headers);
|
|
||||||
+ free (filedata->program_headers);
|
|
||||||
+ free (filedata->string_table);
|
|
||||||
+ free (filedata->dump.dump_sects);
|
|
||||||
+ free (filedata);
|
|
||||||
+ }
|
|
||||||
+ free (program_name);
|
|
||||||
+ program_name = saved_program_name;
|
|
||||||
|
|
||||||
free (ba_cache.strtab);
|
|
||||||
ba_cache.strtab = NULL;
|
|
@ -1,304 +0,0 @@
|
|||||||
diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-elfvers/vers24.rd binutils-2.40-new/ld/testsuite/ld-elfvers/vers24.rd
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-elfvers/vers24.rd 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-elfvers/vers24.rd 2023-03-09 14:51:58.684337020 +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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-10.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-10.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-10.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-10.d 2023-03-09 14:51:58.683337032 +0100
|
|
||||||
@@ -32,7 +32,8 @@ 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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-11.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-11.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-11.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-11.d 2023-03-09 14:51:58.683337032 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-13.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-13.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-13.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-13.d 2023-03-09 14:51:58.679337079 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-14.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-14.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-14.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-14.d 2023-03-09 14:51:58.679337079 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-15.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-15.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-15.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-15.d 2023-03-09 14:51:58.679337079 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-16.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-16.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-16.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-16.d 2023-03-09 14:51:58.680337067 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-17.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-17.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-17.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-17.d 2023-03-09 14:51:58.680337067 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-18.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-18.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-18.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-18.d 2023-03-09 14:51:58.683337032 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-19.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-19.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-19.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-19.d 2023-03-09 14:51:58.684337020 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-20.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-20.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-20.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-20.d 2023-03-09 14:51:58.680337067 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-21.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-21.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-21.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-21.d 2023-03-09 14:51:58.680337067 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-22.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-22.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-22.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-22.d 2023-03-09 14:51:58.680337067 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-23.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-23.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-23.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-23.d 2023-03-09 14:51:58.681337056 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-24.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-24.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-24.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-24.d 2023-03-09 14:51:58.681337056 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-25.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-25.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-25.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-25.d 2023-03-09 14:51:58.681337056 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-28.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-28.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-28.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-28.d 2023-03-09 14:51:58.684337020 +0100
|
|
||||||
@@ -1 +1,2 @@
|
|
||||||
.*: error: Error
|
|
||||||
+#...
|
|
||||||
diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-29.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-29.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-29.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-29.d 2023-03-09 14:51:58.681337056 +0100
|
|
||||||
@@ -1 +1,2 @@
|
|
||||||
.*: warning: Warning
|
|
||||||
+#...
|
|
||||||
diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-30.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-30.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-30.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-30.d 2023-03-09 14:51:58.681337056 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-6.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-6.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-6.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-6.d 2023-03-09 14:51:58.682337044 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-7.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-7.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-7.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-7.d 2023-03-09 14:51:58.682337044 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-8.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-8.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-8.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-8.d 2023-03-09 14:51:58.684337020 +0100
|
|
||||||
@@ -30,9 +30,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
|
|
||||||
-.*: tmpdir/main.o: in function `main':
|
|
||||||
-.*main.c.*: undefined reference to `\.?func'
|
|
||||||
+#...
|
|
||||||
hook called: cleanup.
|
|
||||||
#...
|
|
||||||
diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin-9.d binutils-2.40-new/ld/testsuite/ld-plugin/plugin-9.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin-9.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin-9.d 2023-03-09 14:51:58.682337044 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/plugin.exp binutils-2.40-new/ld/testsuite/ld-plugin/plugin.exp
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/plugin.exp 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/plugin.exp 2023-03-09 14:51:58.685337009 +0100
|
|
||||||
@@ -117,6 +117,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"
|
|
||||||
diff -rupN --no-dereference binutils-2.40/ld/testsuite/ld-plugin/pr20070.d binutils-2.40-new/ld/testsuite/ld-plugin/pr20070.d
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-plugin/pr20070.d 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-plugin/pr20070.d 2023-03-09 14:51:58.683337032 +0100
|
|
||||||
@@ -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 -rupN --no-dereference binutils-2.40/ld/testsuite/ld-srec/srec.exp binutils-2.40-new/ld/testsuite/ld-srec/srec.exp
|
|
||||||
--- binutils-2.40/ld/testsuite/ld-srec/srec.exp 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/testsuite/ld-srec/srec.exp 2023-03-09 14:51:58.683337032 +0100
|
|
||||||
@@ -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
|
|
@ -1,13 +0,0 @@
|
|||||||
diff -rupN --no-dereference binutils-2.40/ld/ldlang.c binutils-2.40-new/ld/ldlang.c
|
|
||||||
--- binutils-2.40/ld/ldlang.c 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/ld/ldlang.c 2023-06-14 16:26:54.425556661 +0200
|
|
||||||
@@ -649,7 +649,8 @@ wild_sort (lang_wild_statement_type *wil
|
|
||||||
looking at the sections for this file. */
|
|
||||||
|
|
||||||
/* Find the correct node to append this section. */
|
|
||||||
- if (compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
|
|
||||||
+ if (sec && sec->spec.sorted != none && sec->spec.sorted != by_none
|
|
||||||
+ && compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
|
|
||||||
tree = &((*tree)->left);
|
|
||||||
else
|
|
||||||
tree = &((*tree)->right);
|
|
@ -0,0 +1,12 @@
|
|||||||
|
diff -rupN --no-dereference binutils-2.41/gold/dwp.cc binutils-2.41-new/gold/dwp.cc
|
||||||
|
--- binutils-2.41/gold/dwp.cc 2023-07-03 01:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.41-new/gold/dwp.cc 2023-10-17 08:36:16.689052035 +0200
|
||||||
|
@@ -2418,6 +2418,8 @@ main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
Dwo_file exe_file(exe_filename);
|
||||||
|
exe_file.read_executable(&files);
|
||||||
|
+ if (files.empty())
|
||||||
|
+ gold_fatal(_("Could not find any dwo links in specified EXE"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add any additional files listed on command line.
|
@ -0,0 +1,71 @@
|
|||||||
|
diff -rupN --no-dereference binutils-2.41/gold/powerpc.cc binutils-2.41-new/gold/powerpc.cc
|
||||||
|
--- binutils-2.41/gold/powerpc.cc 2023-07-03 01:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.41-new/gold/powerpc.cc 2023-10-17 08:36:20.308244748 +0200
|
||||||
|
@@ -3714,12 +3714,7 @@ Target_powerpc<size, big_endian>::do_rel
|
||||||
|
unsigned int prev_brlt_size = 0;
|
||||||
|
if (pass == 1)
|
||||||
|
{
|
||||||
|
- bool thread_safe
|
||||||
|
- = this->abiversion() < 2 && parameters->options().plt_thread_safe();
|
||||||
|
- if (size == 64
|
||||||
|
- && this->abiversion() < 2
|
||||||
|
- && !thread_safe
|
||||||
|
- && !parameters->options().user_set_plt_thread_safe())
|
||||||
|
+ if (size == 64 && this->abiversion() < 2)
|
||||||
|
{
|
||||||
|
static const char* const thread_starter[] =
|
||||||
|
{
|
||||||
|
@@ -3747,29 +3742,37 @@ Target_powerpc<size, big_endian>::do_rel
|
||||||
|
/* libgo */
|
||||||
|
"__go_go",
|
||||||
|
};
|
||||||
|
+ bool thread_safe = parameters->options().plt_thread_safe();
|
||||||
|
|
||||||
|
- if (parameters->options().shared())
|
||||||
|
- thread_safe = true;
|
||||||
|
- else
|
||||||
|
+ if (!thread_safe
|
||||||
|
+ && !parameters->options().user_set_plt_thread_safe())
|
||||||
|
{
|
||||||
|
- for (unsigned int i = 0;
|
||||||
|
- i < sizeof(thread_starter) / sizeof(thread_starter[0]);
|
||||||
|
- i++)
|
||||||
|
+ if (parameters->options().shared())
|
||||||
|
+ thread_safe = true;
|
||||||
|
+ else
|
||||||
|
{
|
||||||
|
- Symbol* sym = symtab->lookup(thread_starter[i], NULL);
|
||||||
|
- thread_safe = (sym != NULL
|
||||||
|
- && sym->in_reg()
|
||||||
|
- && sym->in_real_elf());
|
||||||
|
- if (thread_safe)
|
||||||
|
- break;
|
||||||
|
+ for (unsigned int i = 0;
|
||||||
|
+ i < sizeof(thread_starter) / sizeof(thread_starter[0]);
|
||||||
|
+ i++)
|
||||||
|
+ {
|
||||||
|
+ Symbol* sym = symtab->lookup(thread_starter[i], NULL);
|
||||||
|
+ thread_safe = (sym != NULL
|
||||||
|
+ && sym->in_reg()
|
||||||
|
+ && sym->in_real_elf());
|
||||||
|
+ if (thread_safe)
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ this->plt_thread_safe_ = thread_safe;
|
||||||
|
}
|
||||||
|
- this->plt_thread_safe_ = thread_safe;
|
||||||
|
|
||||||
|
- if (parameters->options().output_is_position_independent())
|
||||||
|
- this->rela_dyn_size_
|
||||||
|
- = this->rela_dyn_section(layout)->current_data_size();
|
||||||
|
+ if (size == 64
|
||||||
|
+ && parameters->options().output_is_position_independent())
|
||||||
|
+ {
|
||||||
|
+ gold_assert (this->rela_dyn_);
|
||||||
|
+ this->rela_dyn_size_ = this->rela_dyn_->current_data_size();
|
||||||
|
+ }
|
||||||
|
|
||||||
|
this->stub_group_size_ = parameters->options().stub_group_size();
|
||||||
|
bool no_size_errors = true;
|
@ -0,0 +1,30 @@
|
|||||||
|
diff -rupN --no-dereference binutils-2.41/bfd/elf.c binutils-2.41-new/bfd/elf.c
|
||||||
|
--- binutils-2.41/bfd/elf.c 2023-10-17 08:36:10.773734280 +0200
|
||||||
|
+++ binutils-2.41-new/bfd/elf.c 2023-10-17 08:36:21.496307731 +0200
|
||||||
|
@@ -9479,6 +9479,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd
|
||||||
|
if (elf_use_dt_symtab_p (abfd))
|
||||||
|
iverneed->vn_filename
|
||||||
|
= elf_tdata (abfd)->dt_strtab + iverneed->vn_file;
|
||||||
|
+ else if (hdr == NULL)
|
||||||
|
+ goto error_return_bad_verref;
|
||||||
|
else
|
||||||
|
iverneed->vn_filename
|
||||||
|
= bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
|
||||||
|
@@ -9516,6 +9518,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd
|
||||||
|
if (elf_use_dt_symtab_p (abfd))
|
||||||
|
ivernaux->vna_nodename
|
||||||
|
= elf_tdata (abfd)->dt_strtab + ivernaux->vna_name;
|
||||||
|
+ else if (hdr == NULL)
|
||||||
|
+ goto error_return_bad_verref;
|
||||||
|
else
|
||||||
|
ivernaux->vna_nodename
|
||||||
|
= bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
|
||||||
|
@@ -9546,7 +9550,7 @@ _bfd_elf_slurp_version_tables (bfd *abfd
|
||||||
|
iverneed->vn_nextref = NULL;
|
||||||
|
if (iverneed->vn_next == 0)
|
||||||
|
break;
|
||||||
|
- if (i + 1 < hdr->sh_info)
|
||||||
|
+ if (hdr != NULL && (i + 1 < hdr->sh_info))
|
||||||
|
iverneed->vn_nextref = iverneed + 1;
|
||||||
|
|
||||||
|
if (iverneed->vn_next
|
@ -1,45 +0,0 @@
|
|||||||
diff -rupN --no-dereference binutils-2.40/binutils/objcopy.c binutils-2.40-new/binutils/objcopy.c
|
|
||||||
--- binutils-2.40/binutils/objcopy.c 2023-01-14 01:00:00.000000000 +0100
|
|
||||||
+++ binutils-2.40-new/binutils/objcopy.c 2023-03-09 14:52:06.043249302 +0100
|
|
||||||
@@ -2403,6 +2403,8 @@ merge_gnu_build_notes (bfd * ab
|
|
||||||
other note then if they are both of the same type (open
|
|
||||||
or func) then they can be merged and one deleted. If
|
|
||||||
they are of different types then they cannot be merged. */
|
|
||||||
+ objcopy_internal_note * prev_note = NULL;
|
|
||||||
+
|
|
||||||
for (pnote = pnotes; pnote < pnotes_end; pnote ++)
|
|
||||||
{
|
|
||||||
/* Skip already deleted notes.
|
|
||||||
@@ -2424,7 +2426,9 @@ merge_gnu_build_notes (bfd * ab
|
|
||||||
objcopy_internal_note * back;
|
|
||||||
|
|
||||||
/* Rule 2: Check to see if there is an identical previous note. */
|
|
||||||
- for (iter = 0, back = pnote - 1; back >= pnotes; back --)
|
|
||||||
+ for (iter = 0, back = prev_note ? prev_note : pnote - 1;
|
|
||||||
+ back >= pnotes;
|
|
||||||
+ back --)
|
|
||||||
{
|
|
||||||
if (is_deleted_note (back))
|
|
||||||
continue;
|
|
||||||
@@ -2486,11 +2490,18 @@ merge_gnu_build_notes (bfd * ab
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-#if DEBUG_MERGE
|
|
||||||
+
|
|
||||||
+
|
|
||||||
if (! is_deleted_note (pnote))
|
|
||||||
- merge_debug ("Unable to do anything with note at %#08lx\n",
|
|
||||||
- (pnote->note.namedata - (char *) contents) - 12);
|
|
||||||
+ {
|
|
||||||
+ /* Keep a pointer to this note, so that we can
|
|
||||||
+ start the next search for rule 2 matches here. */
|
|
||||||
+ prev_note = pnote;
|
|
||||||
+#if DEBUG_MERGE
|
|
||||||
+ merge_debug ("Unable to do anything with note at %#08lx\n",
|
|
||||||
+ (pnote->note.namedata - (char *) contents) - 12);
|
|
||||||
#endif
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Resort the notes. */
|
|
@ -1,36 +0,0 @@
|
|||||||
diff -rupN --no-dereference binutils-2.40/binutils/readelf.c binutils-2.40-new/binutils/readelf.c
|
|
||||||
--- binutils-2.40/binutils/readelf.c 2023-03-09 14:51:52.549407223 +0100
|
|
||||||
+++ binutils-2.40-new/binutils/readelf.c 2023-03-09 14:51:53.790393244 +0100
|
|
||||||
@@ -13247,11 +13247,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));
|
|
||||||
|
|
||||||
@@ -13305,7 +13307,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
|
|
@ -0,0 +1,117 @@
|
|||||||
|
diff -rupN --no-dereference binutils-2.41/binutils/testsuite/binutils-all/objcopy.exp binutils-2.41-new/binutils/testsuite/binutils-all/objcopy.exp
|
||||||
|
--- binutils-2.41/binutils/testsuite/binutils-all/objcopy.exp 2023-07-03 01:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.41-new/binutils/testsuite/binutils-all/objcopy.exp 2023-10-17 08:36:19.150183227 +0200
|
||||||
|
@@ -1409,6 +1409,8 @@ proc objcopy_test_without_global_symbol
|
||||||
|
# The AArch64 and ARM targets preserve mapping symbols
|
||||||
|
# in object files, so they will fail this test.
|
||||||
|
setup_xfail aarch64*-*-* arm*-*-*
|
||||||
|
+# The RISC-V target compiles with annotation enabled and these symbols remain after stripping.
|
||||||
|
+setup_xfail riscv*-*-*
|
||||||
|
|
||||||
|
objcopy_test_without_global_symbol
|
||||||
|
|
||||||
|
diff -rupN --no-dereference binutils-2.41/ld/testsuite/ld-elf/dwarf.exp binutils-2.41-new/ld/testsuite/ld-elf/dwarf.exp
|
||||||
|
--- binutils-2.41/ld/testsuite/ld-elf/dwarf.exp 2023-07-03 01:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.41-new/ld/testsuite/ld-elf/dwarf.exp 2023-10-17 08:36:19.150183227 +0200
|
||||||
|
@@ -29,6 +29,10 @@ if ![is_elf_format] {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
+if { [istarget riscv*-*-*] } then {
|
||||||
|
+ return
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
# Skip targets where -shared is not supported
|
||||||
|
|
||||||
|
if ![check_shared_lib_support] {
|
||||||
|
diff -rupN --no-dereference binutils-2.41/ld/testsuite/ld-elf/tls.exp binutils-2.41-new/ld/testsuite/ld-elf/tls.exp
|
||||||
|
--- binutils-2.41/ld/testsuite/ld-elf/tls.exp 2023-07-03 01:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.41-new/ld/testsuite/ld-elf/tls.exp 2023-10-17 08:36:19.150183227 +0200
|
||||||
|
@@ -28,6 +28,10 @@ if { !([istarget *-*-linux*]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
+if { [istarget riscv*-*-*] } then {
|
||||||
|
+ return
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
# Check to see if the C compiler works.
|
||||||
|
if { ![check_compiler_available] } {
|
||||||
|
return
|
||||||
|
diff -rupN --no-dereference binutils-2.41/ld/testsuite/ld-plugin/plugin.exp binutils-2.41-new/ld/testsuite/ld-plugin/plugin.exp
|
||||||
|
--- binutils-2.41/ld/testsuite/ld-plugin/plugin.exp 2023-07-03 01:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.41-new/ld/testsuite/ld-plugin/plugin.exp 2023-10-17 08:36:19.150183227 +0200
|
||||||
|
@@ -132,6 +132,10 @@ if [is_pecoff_format] {
|
||||||
|
append libs " --image-base=0x10000000"
|
||||||
|
}
|
||||||
|
|
||||||
|
+if { [istarget riscv*-*-*] } then {
|
||||||
|
+ return
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
set plugin_tests [list \
|
||||||
|
[list "load plugin" "-plugin $plugin_path \
|
||||||
|
$testobjfiles $libs" "" "" "" {{ld plugin-1.d}} "main.x" ] \
|
||||||
|
diff -rupN --no-dereference binutils-2.41/ld/testsuite/ld-riscv-elf/attr-phdr.d binutils-2.41-new/ld/testsuite/ld-riscv-elf/attr-phdr.d
|
||||||
|
--- binutils-2.41/ld/testsuite/ld-riscv-elf/attr-phdr.d 2023-07-03 01:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.41-new/ld/testsuite/ld-riscv-elf/attr-phdr.d 2023-10-17 08:36:19.149183174 +0200
|
||||||
|
@@ -12,8 +12,8 @@ Program Headers:
|
||||||
|
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
|
||||||
|
RISCV_ATTRIBUT .*
|
||||||
|
LOAD .*
|
||||||
|
-
|
||||||
|
+#...
|
||||||
|
Section to Segment mapping:
|
||||||
|
Segment Sections...
|
||||||
|
00 .riscv.attributes
|
||||||
|
- 01 .text
|
||||||
|
+#pass
|
||||||
|
diff -rupN --no-dereference binutils-2.41/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d binutils-2.41-new/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d
|
||||||
|
--- binutils-2.41/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d 2023-07-03 01:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.41-new/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d 2023-10-17 08:36:19.149183174 +0200
|
||||||
|
@@ -8,7 +8,7 @@
|
||||||
|
Disassembly of section \.text:
|
||||||
|
|
||||||
|
0+[0-9a-f]+ <_start>:
|
||||||
|
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,[0-9]+
|
||||||
|
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,\-[0-9]+
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+jal[ ]+ra,[0-9a-f]+ <_start>
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,gp,\-[0-9]+ # [0-9a-f]+ <data_g>
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a2,gp,\-[0-9]+ # [0-9a-f]+ <data_g>
|
||||||
|
diff -rupN --no-dereference binutils-2.41/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d binutils-2.41-new/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d
|
||||||
|
--- binutils-2.41/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d 2023-07-03 01:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.41-new/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d 2023-10-17 08:36:19.151183281 +0200
|
||||||
|
@@ -8,11 +8,11 @@
|
||||||
|
Disassembly of section \.text:
|
||||||
|
|
||||||
|
0+[0-9a-f]+ <_start>:
|
||||||
|
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,[0-9]+
|
||||||
|
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,.*
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+jal[ ]+ra,[0-9a-f]+ <_start>
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a1,0x[0-9a-f]+
|
||||||
|
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,a1,[0-9]+ # [0-9a-f]+ <data_g>
|
||||||
|
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,a1,.* # [0-9a-f]+ <data_g>
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+lui[ ]+a2,0x[0-9a-f]+
|
||||||
|
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a2,a2,[0-9]+ # [0-9a-f]+ <data_g>
|
||||||
|
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a2,a2,.* # [0-9a-f]+ <data_g>
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a3,tp,0 # 0 <data_t>
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a0,0x[0-9a-f]+
|
||||||
|
diff -rupN --no-dereference binutils-2.41/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d binutils-2.41-new/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d
|
||||||
|
--- binutils-2.41/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d 2023-07-03 01:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.41-new/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d 2023-10-17 08:36:19.149183174 +0200
|
||||||
|
@@ -11,5 +11,5 @@ Disassembly of section .text:
|
||||||
|
[0-9a-f]+ <_start>:
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a1.*
|
||||||
|
.*:[ ]+[0-9a-f]+[ ]+addi?[ ]+a0,gp.*<data_a>
|
||||||
|
-.*:[ ]+[0-9a-f]+[ ]+addi?[ ]+a1,a1.*<data_b>
|
||||||
|
+.*:[ ]+[0-9a-f]+[ ]+mv[ ]+a1,a1
|
||||||
|
#pass
|
||||||
|
diff -rupN --no-dereference binutils-2.41/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d binutils-2.41-new/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d
|
||||||
|
--- binutils-2.41/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d 2023-07-03 01:00:00.000000000 +0200
|
||||||
|
+++ binutils-2.41-new/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d 2023-10-17 08:36:19.149183174 +0200
|
||||||
|
@@ -2,4 +2,5 @@
|
||||||
|
#source: pcrel-lo-addend-2a.s
|
||||||
|
#as: -march=rv32ic
|
||||||
|
#ld: -m[riscv_choose_ilp32_emul] --no-relax
|
||||||
|
+#skip: *-*-*
|
||||||
|
#error: .*dangerous relocation: %pcrel_lo overflow with an addend, the value of %pcrel_hi is 0x1000 without any addend, but may be 0x2000 after adding the %pcrel_lo addend
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue