This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Advice needed on when to synthesize <sym>.high_bound in ld


For bounded pointers (see http://gcc.gnu.org/projects/bp/main.html),
gcc emits a reference to a symbol named `foo.high_bound' if it doesn't
have enough information to determine the size of `foo'.  This happens
often for extern arrays and extern instances of incomplete struct types.

At link time, I wish to synthesize definitions for symbols with a
`.high_bound' suffix when the real size is known.  For ELF (and mostly
what 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.  Or, should I proceed with ldwrite, and
create just-in-time definions for undefined .high_bound symbols.
Are there other alternatives I haven't considered?

Thanks,
Greg

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]