diff options
author | Michael Meissner <gnu@the-meissners.org> | 1996-05-24 18:30:52 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1996-05-24 18:30:52 +0000 |
commit | 0293d5b019a65b8fb642554d0a8716bbba5d64c7 (patch) | |
tree | 878b4e90c64e9055a8c2109d1f721666eda87a1f /bfd | |
parent | f64dbcddaf55af68fd430ba6f2b851dd1220099c (diff) | |
download | gdb-0293d5b019a65b8fb642554d0a8716bbba5d64c7.zip gdb-0293d5b019a65b8fb642554d0a8716bbba5d64c7.tar.gz gdb-0293d5b019a65b8fb642554d0a8716bbba5d64c7.tar.bz2 |
Do not put small common symbols into .sbss if ld -r
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-ppc.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5defe84..298a524 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com> + + * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common + symbols into .sbss if this is a relocatable link. + Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com> * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 4b31b09..abe5a05 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -1974,12 +1974,14 @@ ppc_elf_check_relocs (abfd, info, sec, relocs) if (h != NULL && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) break; + /* fall through */ case R_PPC_REL14: case R_PPC_REL14_BRTAKEN: case R_PPC_REL14_BRNTAKEN: if (h == NULL) break; + /* fall through */ default: if (info->shared @@ -2047,7 +2049,7 @@ ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) asection **secp; bfd_vma *valp; { - if (sym->st_shndx == SHN_COMMON && sym->st_size <= bfd_get_gp_size (abfd)) + if (sym->st_shndx == SHN_COMMON && !info->relocateable && sym->st_size <= bfd_get_gp_size (abfd)) { /* Common symbols less than or equal to -G nn bytes are automatically put into .sdata. */ |