Re: Out of order unwind entry warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi Dave,
> 
> > On 10/28/2009 12:19 AM, John David Anglin wrote:
> >> From my understanding of things, it shouldn't be necessary to remove the
> >>unwind info for unused weak  symbols if they aren't garbage collected.
> 
> What do you mean with "garbage collected" ?  "dropped from the executable" ?
> AFAICS, the weak function was completely dropped from the vmlinux file.

Yes, I mean "dropped from the executable".  Dropping weak functions
is trickier than just leaving them in place.  It is easier to just
adjust the linkage.  The default behavior of HP ld is to leave unused
functions.  Don't know about GNU ld.  If GNU ld drops unused weak
functions, then the PARISC.unwind entries for them need to be removed.

> Some more info:
> The unwind function in the parisc linux kernel walks the (sorted!) unwind list.
> If one entry is wrong this can lead to incorrect unwinding.
> 
> In this case:
> 
> <arch_mod_section_prepend>: [0x1011fc4c-0x1011fc74]   - non-weak function
>            Entry_GR=1 Save_SP Total_frame_size=8
> <arch_mod_section_prepend>: [0x1011fc4c-0x10167cf4]  - weak function
>            Entry_GR=1 Save_SP Total_frame_size=8
> <module_arch_cleanup>: [0x1011fc78-0x1011fcb8]
>            Entry_GR=2 Save_SP Save_RP Total_frame_size=8
> 
> I see a those options:
> a) drop the second (weak) unwind info entry
> b) for the weak function, use the same start- and end-addresses as the non-weak entry.
> 
> Option b) would probably need some adjustments to the existing parisc
> specific unwind function.

I'm not keen about b).  From looking at one of my builds, it does indeed
look like the weak version of arch_mod_section_prepend has been dropped
(can only find one copy with objdump).

Do you know if linux uses the --gc-sections ld option?  This together
with the GCC -function-sections option might contribute to this problem.

Dave
-- 
J. David Anglin                                  dave.anglin@xxxxxxxxxxxxxx
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux