From: Jeffrey A Law <law@cygnus.com>
To: Alan Modra <alan@linuxcare.com.au>
Cc: binutils@sourceware.cygnus.com
Subject: Re: Unique section ids
Date: Thu, 06 Jul 2000 10:09:00 -0000 [thread overview]
Message-ID: <11211.962903402@upchuck> (raw)
In-Reply-To: <Pine.LNX.4.21.0007061317050.353-100000@front.linuxcare.com.au>
In message < Pine.LNX.4.21.0007061317050.353-100000@front.linuxcare.com.au >you
write:
> I'd like to add another field to the asection structure to uniquely
> identify input sections. The reason for this is that the hppa port needs
> to create long branch stubs to local symbols, and some means is needed to
> make local symbols globally unique so we can use a hash lookup. I'm
> currently using the following:
>
> if (h == NULL)
> sprintf (stub_name + len - 10, "_%08x",
> (int) sym_sec & 0xffffffff);
>
> ie. We just tack on the address of the asection structure. This works
> quite well, but it has the drawback that the memory address of the
> structure is fairly random. For exactly the same input files, stubs
> output via bfd_hash_traverse come in a different order for different
> linker builds. This makes comparison of output files (and debugging the
> linker) more difficult.
>
> Has anyone a better idea? Or can point me to an existing way of uniquely
> identifying input sections short of enumerating over input bfds?
Sounds like a good idea to me. I've never been proud of that terrible
code fragment, just about anything would be cleaner.
jeff
next prev parent reply other threads:[~2000-07-06 10:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-05 21:00 Alan Modra
2000-07-06 10:09 ` Jeffrey A Law [this message]
2000-07-06 10:29 Nick Clifton
2000-07-06 10:58 ` Jeffrey A Law
2000-07-06 11:27 Nick Clifton
2000-07-08 5:16 ` 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=11211.962903402@upchuck \
--to=law@cygnus.com \
--cc=alan@linuxcare.com.au \
--cc=binutils@sourceware.cygnus.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).