bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/15200] Runtime undefined reference to __exidx_start/_end


From: petechou at gmail dot com
Subject: [Bug gold/15200] Runtime undefined reference to __exidx_start/_end
Date: Tue, 26 Mar 2013 08:01:28 +0000

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

--- Comment #23 from pete <petechou at gmail dot com> 2013-03-26 08:01:28 UTC 
---
Created attachment 6949
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6949
Android libc.so w/o __exidx_start/end

Hello Ian,

I find one issue with the patch in comment #13: 
Unable to define exidx section symbols in output data when linking the attached
libc.so w/o __exidx_start/end, and there is a reference to the undefined exidx
symbol in regular object.

We probably should still check symbol->is_undefined() instead.
Symbol::IS_UNDEFINED only covers the undefined symbols from command line (-u
option). Then, the code would be

    if (oldsym == NULL)
      return NULL;
    if (oldsym->is_undefined())
      ;
    else if (!oldsym->in_reg())
      return NULL;
    else if (oldsym->is_from_dynobj())
      ;
    else
      return NULL;

Or
    if (oldsym == NULL || !oldsym->in_reg())
      return NULL;
    if (!oldsym->is_undefined() && !oldsym->is_from_dynobj())
      return NULL;

Please let me know your comment. Thanks.


===== REPRODUCE STEP =====

$ readelf -rs plasma.o | grep exidx
...
00000590  00009c1a R_ARM_GOT_BREL    00000000   __exidx_end
00000594  00009d1a R_ARM_GOT_BREL    00000000   __exidx_start
...
   154: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gnu_Unwind_Find_exidx
   156: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __exidx_end
   157: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __exidx_start

$ readelf -s libc.so | grep exidx
    74: 00008b78    20 FUNC    GLOBAL DEFAULT    4 __gnu_Unwind_Find_exidx
    78: 00008b78    20 FUNC    GLOBAL DEFAULT    4 __gnu_Unwind_Find_exidx

$ arm-linux-androideabi-ld.gold -shared -o libplasma.so plasma.o libc.so 

$ readelf -rs libplasma.so | grep exidx
0000409c  00001a15 R_ARM_GLOB_DAT    00000000   __exidx_end
000040a0  00001b15 R_ARM_GLOB_DAT    00000000   __exidx_start
    25: 00000000     0 FUNC    WEAK   DEFAULT  UND __gnu_Unwind_Find_exidx
    26: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __exidx_end
    27: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __exidx_start
   120: 00000000     0 FUNC    WEAK   DEFAULT  UND __gnu_Unwind_Find_exidx
   121: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __exidx_end
   122: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __exidx_start

-- 
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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]