* [binutils-gdb] MIPS: Don't move __gnu_lto_slim to .scommon
@ 2023-07-20 9:06 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-07-20 9:06 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=22e69d8d37738c2aa33543b9f311130d3fe2e4c3
commit 22e69d8d37738c2aa33543b9f311130d3fe2e4c3
Author: Alan Modra <amodra@gmail.com>
Date: Thu Jul 20 17:55:38 2023 +0930
MIPS: Don't move __gnu_lto_slim to .scommon
* elfxx-mips.c (_bfd_mips_elf_symbol_processing): Don't treat
__gnu_lto_slim as SHN_MIPS_SCOMMON.
(_bfd_mips_elf_add_symbol_hook): Likewise.
Diff:
---
bfd/elfxx-mips.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 71f2dc9d779..1e9851c3190 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -7176,10 +7176,11 @@ _bfd_mips_elf_symbol_processing (bfd *abfd, asymbol *asym)
case SHN_COMMON:
/* Common symbols less than the GP size are automatically
- treated as SHN_MIPS_SCOMMON symbols on IRIX5. */
+ treated as SHN_MIPS_SCOMMON symbols, with some exceptions. */
if (asym->value > elf_gp_size (abfd)
|| ELF_ST_TYPE (elfsym->internal_elf_sym.st_info) == STT_TLS
- || IRIX_COMPAT (abfd) == ict_irix6)
+ || IRIX_COMPAT (abfd) == ict_irix6
+ || strcmp (asym->name, "__gnu_lto_slim") == 0)
break;
/* Fall through. */
case SHN_MIPS_SCOMMON:
@@ -7862,10 +7863,11 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
{
case SHN_COMMON:
/* Common symbols less than the GP size are automatically
- treated as SHN_MIPS_SCOMMON symbols. */
+ treated as SHN_MIPS_SCOMMON symbols, with some exceptions. */
if (sym->st_size > elf_gp_size (abfd)
|| ELF_ST_TYPE (sym->st_info) == STT_TLS
- || IRIX_COMPAT (abfd) == ict_irix6)
+ || IRIX_COMPAT (abfd) == ict_irix6
+ || strcmp (*namep, "__gnu_lto_slim") == 0)
break;
/* Fall through. */
case SHN_MIPS_SCOMMON:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-20 9:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-20 9:06 [binutils-gdb] MIPS: Don't move __gnu_lto_slim to .scommon 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).