This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: gold vs libc


> https://sourceware.org/bugzilla/show_bug.cgi?id=14675

Thanks.  In fact, CFI in crt1.o is useful for the debugger (which doesn't
care where __EH_FRAME_BEGIN__ points).  See:
	https://sourceware.org/ml/libc-alpha/2012-03/msg00573.html
for why we added it.

In the (more common) dynamic linking case, it works fine because
__EH_FRAME_BEGIN__ is not used.  Insteaad, --eh-frame-hdr is used at link
time so PT_GNU_EH_FRAME can be used at runtime.  I don't know why we don't
do it that way for static linking too.  The binary-search table is a
worthwhile optimization for everybody.

AFAICT if we just started passing --eh-frame-hdr and stopped using
crt{begin,end}T.o instead of crt{begin,end}.o under -static it would work
as is.  dl_iterate_phdr in the static case should already find the
program's own phdr so libgcc can find PT_GNU_EH_FRAME in there and be happy.

But given the status quo, gold should do something more like what ld does.


Thanks,
Roland


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