This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Bug ld/1135] strip is broken
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: sourceware-bugzilla at sources dot redhat dot com
- Cc: danglin at gcc dot gnu dot org, binutils at sources dot redhat dot com
- Date: Sat, 13 Aug 2005 21:07:06 -0400 (EDT)
- Subject: Re: [Bug ld/1135] strip is broken
> I don't have PA machine nor documents. The problem with PA is an
> incomplete port. Please feel free to fix it, using my patch if you
> want.
This is what I committed based on the behavior of HP ld and strip.
Tested on hppa64-hp-hpux11.11.
H. J., thanks for investigating the problem and providing a fix.
There's more that needs doing to correctly handle short sections
but I'll leave that for later.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2005-08-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR ld/1135
* elf64-hppa.c (elf64_hppa_special_sections): Add flag definitions for
.plt, .dlt, .sdata, .sbss and .tbss.
Index: elf64-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-hppa.c,v
retrieving revision 1.64
diff -u -3 -p -r1.64 elf64-hppa.c
--- elf64-hppa.c 29 Jul 2005 02:46:03 -0000 1.64
+++ elf64-hppa.c 14 Aug 2005 00:31:57 -0000
@@ -2643,9 +2643,14 @@ elf64_hppa_elf_get_symbol_type (elf_sym,
static const struct bfd_elf_special_section elf64_hppa_special_sections[] =
{
- { ".fini", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".init", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, 0, 0, 0 }
+ { ".fini", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".init", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".plt", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT },
+ { ".dlt", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT },
+ { ".sdata", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT },
+ { ".sbss", 5, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_SHORT },
+ { ".tbss", 5, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_PARISC_WEAKORDER },
+ { NULL, 0, 0, 0, 0 }
};
/* The hash bucket size is the standard one, namely 4. */