mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-05 12:53:16 +08:00
make objcopy fail if it is asked to redefine symbols in an object file containing LTO information.
* objcopy.c (filter_symbols): Fail if attempting to dredefine symbols in an LTO object file.
This commit is contained in:
parent
6010fb0c49
commit
7325ba796b
@ -1,3 +1,8 @@
|
||||
2021-09-30 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* objcopy.c (filter_symbols): Fail if attempting to dredefine
|
||||
symbols in an LTO object file.
|
||||
|
||||
2021-09-27 Nick Alcock <nick.alcock@oracle.com>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
@ -1542,6 +1542,13 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
|
||||
{
|
||||
char *new_name;
|
||||
|
||||
if (name[0] == '_'
|
||||
&& name[1] == '_'
|
||||
&& strcmp (name + (name[2] == '_'), "__gnu_lto_slim") == 0)
|
||||
{
|
||||
fatal (_("redefining symbols does not work on LTO-compiled object files"));
|
||||
}
|
||||
|
||||
new_name = (char *) lookup_sym_redefinition (name);
|
||||
if (new_name == name
|
||||
&& (flags & BSF_SECTION_SYM) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user