This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [lto] PATCH: Add support for referencing types from function bodies

On Tue, Sep 05, 2006 at 08:22:06PM -0400, Kenneth Zadeck wrote:
> It seems like the right thing is not to have the offset adjusted by ld
> -r but to have the sections numbers be replaced by reference to a label
> at the beginning of the debug section.  When the debug sections are
> concatinated, these labels will become interior to the concatinated
> debug info, but that is fine.  The offset from that label remains the same.

Except they won't necessarily.  The relocation will be updated, but you
can not count on the section contents (it will work on REL
architectures but not RELA).

Mark, I don't think you've got a way out of this: if you want ld -r to
work, you're going to have to process at least some relocations.  You
can limit the number of relocations by intelligent choices, I expect;
having one per label could be seriously bad for performance, so maybe
one per function or something like that.  Basically, replace your
"section number" by a reference to a label in that section.

Daniel Jacobowitz

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