Quick question about _bfd_generic_link_add_one_symbol state machine and weak symbols

Dave Korn dave.korn.cygwin@googlemail.com
Sun Mar 29 07:13:00 GMT 2009


  Morning all,

static const enum link_action link_action[8][8] =
{
  /* current\prev    new    undef  undefw def    defw   com    indr   warn  */
  /* UNDEF_ROW 	*/  {UND,   NOACT, UND,   REF,   REF,   NOACT, REFC,  WARNC },
                                   ^^^

  If my current understanding is right, the significance of the underlined
entry is that if have an undefined weak reference, and we later see an
ordinary undefined reference to the same symbol, the original reference
becomes non-weak.

  Can anyone explain why, though?  I don't get what the intent is behind this.

    cheers,
      DaveK



More information about the Binutils mailing list