aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-03-25 06:02:28 +0000
committerAlan Modra <amodra@gmail.com>2013-03-25 06:02:28 +0000
commit191c0c4245f0372726aaa6d7972fd7187f7cccb9 (patch)
treef1376b309d44e922d5d7f1d52219830f728a8897 /bfd/elflink.c
parent5d13b3b31966d19c8cd83b8e4116db437fb820e2 (diff)
downloadgdb-191c0c4245f0372726aaa6d7972fd7187f7cccb9.zip
gdb-191c0c4245f0372726aaa6d7972fd7187f7cccb9.tar.gz
gdb-191c0c4245f0372726aaa6d7972fd7187f7cccb9.tar.bz2
* elflink.c (_bfd_elf_merge_symbol): Don't discard TLS symbols here.
Wrap long lines. (elf_link_add_object_symbols): Discard TLS symbols for --just-syms early in symbol loop.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index b5d9415..1e341da 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -938,15 +938,6 @@ _bfd_elf_merge_symbol (bfd *abfd,
sec = *psec;
bind = ELF_ST_BIND (sym->st_info);
- /* Silently discard TLS symbols from --just-syms. There's no way to
- combine a static TLS block with a new TLS block for this executable. */
- if (ELF_ST_TYPE (sym->st_info) == STT_TLS
- && sec->sec_info_type == SEC_INFO_TYPE_JUST_SYMS)
- {
- *skip = TRUE;
- return TRUE;
- }
-
if (! bfd_is_und_section (sec))
h = elf_link_hash_lookup (elf_hash_table (info), name, TRUE, FALSE, FALSE);
else
@@ -1145,19 +1136,23 @@ _bfd_elf_merge_symbol (bfd *abfd,
if (tdef && ntdef)
(*_bfd_error_handler)
- (_("%s: TLS definition in %B section %A mismatches non-TLS definition in %B section %A"),
+ (_("%s: TLS definition in %B section %A "
+ "mismatches non-TLS definition in %B section %A"),
tbfd, tsec, ntbfd, ntsec, h->root.root.string);
else if (!tdef && !ntdef)
(*_bfd_error_handler)
- (_("%s: TLS reference in %B mismatches non-TLS reference in %B"),
+ (_("%s: TLS reference in %B "
+ "mismatches non-TLS reference in %B"),
tbfd, ntbfd, h->root.root.string);
else if (tdef)
(*_bfd_error_handler)
- (_("%s: TLS definition in %B section %A mismatches non-TLS reference in %B"),
+ (_("%s: TLS definition in %B section %A "
+ "mismatches non-TLS reference in %B"),
tbfd, tsec, ntbfd, h->root.root.string);
else
(*_bfd_error_handler)
- (_("%s: TLS reference in %B mismatches non-TLS definition in %B section %A"),
+ (_("%s: TLS reference in %B "
+ "mismatches non-TLS definition in %B section %A"),
tbfd, ntbfd, ntsec, h->root.root.string);
bfd_set_error (bfd_error_bad_value);
@@ -3976,6 +3971,13 @@ error_free_dyn:
goto error_free_vers;
}
+ /* Silently discard TLS symbols from --just-syms. There's
+ no way to combine a static TLS block with a new TLS block
+ for this executable. */
+ if (ELF_ST_TYPE (isym->st_info) == STT_TLS
+ && sec->sec_info_type == SEC_INFO_TYPE_JUST_SYMS)
+ continue;
+
if (bfd_is_und_section (sec)
|| bfd_is_com_section (sec))
definition = FALSE;