From: ross.alexander@uk.neceur.com
To: law@redhat.com
Cc: binutils@sources.redhat.com
Subject: Re: hppa64-hp-hpux11.00: HP ELF64 brokeness (incorrect .dynamic section)
Date: Wed, 03 Jul 2002 05:14:00 -0000 [thread overview]
Message-ID: <OF7D4F8DA6.B6D7E04F-ON80256BEB.003D3EFB@uk.neceur.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2456 bytes --]
HP have sent me a copy of ld64 with the bug fixed but here is the patch
anyway.
bfd/Changelog
* elf.c (bfd_elf_get_bfd_needed_list): Current HP ld64 and existing
shared
libraries erronously set sh_link in the .dynamic section to 0. It
should be
set to the index of the .dynstr section. Should be fixed on ld
patches later
than PHSS_26262 as HP has produced a site specific fix.
(See attached file: elf.c.patch)
---------------------------------------------------------------------------------
Ross Alexander "He knows no more about his
MIS - NEC Europe Limited destiny than a tea leaf knows
Work ph: +44 20 8752 3394 the history of East India Company"
|---------+------------------------------>
| | Jeff Law |
| | <law@porcupine.slc.|
| | redhat.com> |
| | |
| | 02/07/2002 19:23 |
| | Please respond to |
| | law |
| | |
|---------+------------------------------>
>------------------------------------------------------------------------------------------------------------|
| |
| To: ross.alexander@uk.neceur.com |
| cc: binutils@sources.redhat.com |
| Subject: Re: hppa64-hp-hpux11.00: HP ELF64 brokeness (incorrect .dynamic section) |
>------------------------------------------------------------------------------------------------------------|
In message <OF57EE2279.B5306762-ON80256BEA.0056AFF9@uk.neceur.com>,
ross.alexan
der@uk.neceur.com writes:
>
> I don't mind producing a patch to create a workaround (it is very
straight
> forward, for a change) or we could produce a program which 'corrects'
the
> defective libraries. However, because these are system libraries, a
lot
> of people may be unwilling to go near then.
I suspect "fixing" the defective libraries won't be palatable to most
folks. If we can engineer a clean workaround in bfd so that we can deal
with the broken libraries in a sane way that would probably be best.
jeff
[-- Attachment #2: elf.c.patch --]
[-- Type: application/octet-stream, Size: 602 bytes --]
*** binutils-020702/bfd/elf.c.orig Tue Jul 2 05:31:22 2002
--- binutils-020702/bfd/elf.c Wed Jul 3 12:07:33 2002
***************
*** 1568,1573 ****
--- 1568,1580 ----
shlink = elf_elfsections (abfd)[elfsec]->sh_link;
+ /* HP ELF linker brokeness. The sh_link on dynamic is set to 0. */
+ if (shlink == 0)
+ {
+ asection *dynstr = bfd_get_section_by_name(abfd, ".dynstr");
+ shlink = _bfd_elf_section_from_bfd_section (abfd, dynstr);
+ }
+
extdynsize = get_elf_backend_data (abfd)->s->sizeof_dyn;
swap_dyn_in = get_elf_backend_data (abfd)->s->swap_dyn_in;
next reply other threads:[~2002-07-03 11:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-03 5:14 ross.alexander [this message]
2002-07-04 0:19 ` Alan Modra
-- strict thread matches above, loose matches on Subject: below --
2002-07-04 4:18 ross.alexander
2002-07-04 6:39 ` Alan Modra
2002-07-03 12:45 John David Anglin
2002-07-03 13:10 ` Jeff Law
2002-07-02 8:57 ross.alexander
2002-07-02 11:20 ` Jeff Law
2002-07-01 8:16 ross.alexander
2002-07-01 16:18 ` Alan Modra
2002-06-28 12:07 ross.alexander
2002-06-30 4:12 ` Alan Modra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF7D4F8DA6.B6D7E04F-ON80256BEB.003D3EFB@uk.neceur.com \
--to=ross.alexander@uk.neceur.com \
--cc=binutils@sources.redhat.com \
--cc=law@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).