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]

Re: [PATCH] Handle weak symbols

>>>>> "Franz" == Franz Sirl <> writes:

    >> 1. The front-end sets DECL_WEAK when it creates a declaration
    >> for which `#pragma weak' has been seen.  This is easy, but we
    >> should still use a data structure smarter than a linked list to
    >> store the list of `#pragma weak' names.

    Franz> I don't think it's worth to do that for a seldom used
    Franz> #pragma weak.

I think it's the only correct way to do it.  We should get this
information represented in the tree structure, not just let it hang
around on the side.  (I'd be happy just to get rid of #pragma weak,
given that we have the superior __attribute__ mechanism, but I suspect
that would break various systems that use #pragma weak in their

    >> 2. make_decl_rtl should set SYMBOL_REF_WEAK from DECL_WEAK, as
    >> per Franz's patch.
    >> 3. rtx_addr_can_trap_p should check SYMBOL_REF_WEAK as per
    >> Franz's patch.

    Franz> As you seem to agree with my way to implement these 2
    Franz> points, can only that go in? These 2 are enough to fix the
    Franz> glibc problem for now. We can work on the rest of the patch
    Franz> in the mainline.

Yes, these bits are fine.  Please send me a revised patch, and I'll
approve it.

Thank you,

Mark Mitchell         
CodeSourcery, LLC     

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