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: [patch] Ignore relocations from .eh_frame for gc


> Looking at a synthetic testcase I noticed that gold will record
> relocations from .eh_frame during gc. This doesn't change the output
> as .eh_frame never goes to the worklist, but it does slows gold down a
> bit.
>
> The attached patch changes the gc code to ignore .eh_frame. Not sure
> if it is worth it the special case. If it is, is this the correct way
> to detect .eh_frame?

I'm not sure it's worth it -- getting the section_name() can be slow,
especially if we're not mmap'ing files, so this test case may not be
representative. Also, I wouldn't expect a lot of relocations in
.eh_frame sections (maybe just one per section?).

At any rate, note that just a few lines below your addition, we do get
the section name if --icf is enabled. You may as well wait until that
point to check for .eh_frame, then you can at least do the check at
less cost when --icf is enabled.

-cary


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