http://sourceware.org/bugzilla/show_bug.cgi?id=15200

--- Comment #20 from pete <petechou at gmail dot com> 2013-03-21 05:05:21 UTC 
---
(In reply to comment #19)
> The in_reg() and in_dyn() functions are not mutually exclusive.  Both will
> return true if a symbol appears in both a regular object and a dynamic object.

I think your patch probably should be changed to

    if (oldsym == NULL)
      return NULL;
    if (oldsym->source() == Symbol::IS_UNDEFINED)
      ;
    else if (oldsym->is_from_dynobj())
      ;
    else if (oldsym->in_reg())
      return NULL;
    else
      return NULL;

Or maybe we don't need to check in_reg()/in_dyn() at all? Then the code could
be like

    if (oldsym == NULL)
        return NULL;
    if (oldsym->source() != Symbol::IS_UNDEFINED &&
        !oldsym->is_from_dynobj())
        return NULL;

This would check if there is a reference and a definition in dynobj as well.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to