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

--- Comment #6 from Zhiyuan Lv <zhiyuan.lv at linux dot intel.com> ---
(In reply to H.J. Lu from comment #5)
> Created attachment 16083 [details]
> A patch to add --unique-pushsection and .pushuniquesection
> 
> Try this.

Hi H.J, the patch works nicely with my simple test case, but still did not get
expected result while trying with Linux kernel build. I did some investigation
and found it to be related to "-fpatchable-function-entry=16,16". If I add this
gcc option to compile test.c, the relocation entry for .alt_section is
combined, causing the section dependencies again.

I checked the section names of test.o with and without
"patchable-function-entry". without the parameter, section names are:
".alt_section.text.foo1"
".alt_section.text.foo2"

with the parameter, section name is:
"alt_section__patchable_function_entries"

And, another thing weird is that: the macro is used in functions foo2 and foo3,
but the alt_function name suffix is "foo1"/"foo2". Could that be a hint?

BTW, thanks much for the very prompt patches! Appreciate that!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to