From: "H . J . Lu" <hjl@lucon.org>
To: Nick Clifton <nickc@cambridge.redhat.com>
Cc: binutils@sources.redhat.com, Ian Lance Taylor <ian@zembu.com>
Subject: Re: elf_link_hash_entry vs generic_link_hash_entry
Date: Fri, 24 Aug 2001 10:02:00 -0000 [thread overview]
Message-ID: <20010824100230.A5440@lucon.org> (raw)
In-Reply-To: <m3lmk9fmgc.fsf@north-pole.nickc.cambridge.redhat.com>
On Fri, Aug 24, 2001 at 05:32:19PM +0100, Nick Clifton wrote:
>
> I had to make one change though - I reverted the definition of
> elf_hash_table() back to its original version, since it cannot be
> allowed to return NULL. (It is used in too many places as the first
> argument to elf_link_hash_lookup). Instead I created a new macro
> called 'is_elf_hash_table' and I added code to check it in
> elf_link_add_object_symbols(), like this.
>
I don't like it. I prefer elf_hash_table
1. Returns NULL on generic hash table
#define elf_hash_table(p) \
((struct elf_link_hash_table *) \
(((p)->hash->type == bfd_link_elf_hash_table) ? (p)->hash : NULL))
so that ld gets a core dump. Or
2. Aborts on generic hash table
#define elf_hash_table(p) \
((struct elf_link_hash_table *) \
(((p)->hash->type == bfd_link_elf_hash_table)
? (p)->hash : (abort (), NULL)))
so that we can catch all the bogus code.
H.J.
next prev parent reply other threads:[~2001-08-24 10:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <si66bh2zdl.fsf@daffy.airs.com>
2001-08-22 0:44 ` Nick Clifton
2001-08-22 1:06 ` Thiemo Seufer
2001-08-22 7:02 ` Ian Lance Taylor
2001-08-23 9:22 ` H . J . Lu
2001-08-23 11:36 ` H . J . Lu
2001-08-23 12:10 ` H . J . Lu
2001-08-24 9:35 ` Nick Clifton
2001-08-24 9:54 ` H . J . Lu
2001-08-24 10:02 ` H . J . Lu [this message]
2001-08-24 9:18 ` Nick Clifton
2001-08-24 9:22 ` H . J . Lu
2001-08-28 15:53 ` Richard Henderson
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=20010824100230.A5440@lucon.org \
--to=hjl@lucon.org \
--cc=binutils@sources.redhat.com \
--cc=ian@zembu.com \
--cc=nickc@cambridge.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).