* lto and tls symbols
@ 2011-06-21 14:57 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2011-06-21 14:57 UTC (permalink / raw)
To: binutils
LTO IR symbols don't have too many fancy ELF features. Applying
mainline and branch.
* elflink.c (_bfd_elf_merge_symbol): Allow type changes for
plugin symbols. Fix segfault on linker scrip defined syms.
Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.411
diff -u -p -r1.411 elflink.c
--- bfd/elflink.c 14 Jun 2011 02:45:12 -0000 1.411
+++ bfd/elflink.c 21 Jun 2011 14:53:25 -0000
@@ -1080,11 +1080,15 @@ _bfd_elf_merge_symbol (bfd *abfd,
return TRUE;
}
+ /* Plugin symbol type isn't currently set. Stop bogus errors. */
+ if (oldbfd != NULL && (oldbfd->flags & BFD_PLUGIN) != 0)
+ *type_change_ok = TRUE;
+
/* Check TLS symbol. We don't check undefined symbol introduced by
"ld -u". */
- if ((ELF_ST_TYPE (sym->st_info) == STT_TLS || h->type == STT_TLS)
- && ELF_ST_TYPE (sym->st_info) != h->type
- && oldbfd != NULL)
+ else if (oldbfd != NULL
+ && ELF_ST_TYPE (sym->st_info) != h->type
+ && (ELF_ST_TYPE (sym->st_info) == STT_TLS || h->type == STT_TLS))
{
bfd *ntbfd, *tbfd;
bfd_boolean ntdef, tdef;
@@ -1423,7 +1427,8 @@ _bfd_elf_merge_symbol (bfd *abfd,
if (newdef && olddef && newweak)
{
/* Don't skip new non-IR weak syms. */
- if (!((oldbfd->flags & BFD_PLUGIN) != 0
+ if (!(oldbfd != NULL
+ && (oldbfd->flags & BFD_PLUGIN) != 0
&& (abfd->flags & BFD_PLUGIN) == 0))
*skip = TRUE;
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-21 14:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 14:57 lto and tls symbols Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).