This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Advice needed on when to synthesize <sym>.high_bound in ld
- To: binutils at sources dot redhat dot com
- Subject: Advice needed on when to synthesize <sym>.high_bound in ld
- From: Greg McGary <greg at mcgary dot org>
- Date: Fri, 25 Aug 2000 17:29:36 -0700
For bounded pointers (see http://gcc.gnu.org/projects/bp/main.html),
gcc will emit symbol references named `foo.high_bound', if it doesn't
have enough information to determine the size of `foo' at the time
its address is taken. This happens often for extern arrays and
incomplete struct types.
At link time, I wish to synthesize definitions for symbols with a
`.high_bound' suffix. For ELF (and that's all I care about), this is
easy since all data & common symbol table entries have sizes.
What's the best time to do this?should I make a separate pass prior to
ldwrite looking for undefined .high_bound symbols and create
definitions for them.
Should I test for the `.high_bound'
suffix and lookup the base symbol name at the time an undefined
is normally detected, or