This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Providing init_fini_syms earlier?


On Tue, Jul 05, 2005 at 11:30:22AM -0700, H. J. Lu wrote:
> On Tue, Jul 05, 2005 at 01:24:54PM -0400, Carlos O'Donell wrote:
> > On Tue, Jul 05, 2005 at 09:24:03AM -0700, H. J. Lu wrote:
> > > On Tue, Jul 05, 2005 at 10:13:43AM -0400, Carlos O'Donell wrote:
> > > Can you try
> > > 
> > > http://sourceware.org/ml/binutils/2005-05/msg00767.html
> > > 
> > > You may have to adjust it a little bit by hand.
> > 
> > It doesn't solve my issue, though the patch is very usefull, and I would
> > recommend it get applied.
> > 
> > The provide is not early enough, and hppa isn't taking advantage of the
> > relaxation pass.
> > 
> > I would have to write a relaxation handler, which is probably a good
> > idea.
> 
> Do you have a testcase?

Yes. Any program built with upstream binutils has extra R_PARISC_NONE
relocs. 

If built with the upstream bintuils:

Relocation section '.rela.dyn' at offset 0x32c contains 5 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00000000  00000000 R_PARISC_NONE                                00000000
00000000  00000000 R_PARISC_NONE                                00000000
00000000  00000000 R_PARISC_NONE                                00000000
00000000  00000000 R_PARISC_NONE                                00000000
00020a64  00000701 R_PARISC_DIR32    00020a44   _GLOBAL_OFFSET_TABLE_ + 0

Symbol table '.dynsym' contains 12 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 00020a6c     0 OBJECT  LOCAL  HIDDEN  ABS __fini_array_end
     2: 00010700   132 FUNC    GLOBAL DEFAULT   11 __libc_csu_fini
     3: 00020a6c     0 OBJECT  LOCAL  HIDDEN  ABS __fini_array_start
     4: 00010670   144 FUNC    GLOBAL DEFAULT   11 __libc_csu_init
     5: 0001051c     8 FUNC    GLOBAL DEFAULT   11 main
     6: 00020a6c     0 OBJECT  LOCAL  HIDDEN  ABS __init_array_end
     7: 00020a44     0 OBJECT  GLOBAL DEFAULT  ABS _GLOBAL_OFFSET_TABLE_
     8: 00020a6c     0 OBJECT  LOCAL  HIDDEN  ABS __init_array_start
     9: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
    10: 00000000   368 FUNC    GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.2 (2)
    11: 000107e8     4 FUNC    WEAK   DEFAULT   11 __gmon_start__

If built with debian binutils:
Relocation section '.rela.dyn' at offset 0x32c contains 5 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00020a58  00000101 R_PARISC_DIR32    000208fc   __fini_array_end + 0
00020a5c  00000301 R_PARISC_DIR32    000208fc   __fini_array_start + 0
00020a60  00000601 R_PARISC_DIR32    000208fc   __init_array_end + 0
00020a64  00000701 R_PARISC_DIR32    00020a44   _GLOBAL_OFFSET_TABLE_ + 0
00020a68  00000801 R_PARISC_DIR32    000208fc   __init_array_start + 0

Symbol table '.dynsym' contains 12 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 000208fc     0 NOTYPE  GLOBAL DEFAULT  ABS __fini_array_end
     2: 00010700   132 FUNC    GLOBAL DEFAULT   11 __libc_csu_fini
     3: 000208fc     0 NOTYPE  GLOBAL DEFAULT  ABS __fini_array_start
     4: 00010670   144 FUNC    GLOBAL DEFAULT   11 __libc_csu_init
     5: 0001051c     8 FUNC    GLOBAL DEFAULT   11 main
     6: 000208fc     0 NOTYPE  GLOBAL DEFAULT  ABS __init_array_end
     7: 00020a44     0 OBJECT  GLOBAL DEFAULT  ABS _GLOBAL_OFFSET_TABLE_
     8: 000208fc     0 NOTYPE  GLOBAL DEFAULT  ABS __init_array_start
     9: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
    10: 00000000   368 FUNC    GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.2 (2)
    11: 000107e8     4 FUNC    WEAK   DEFAULT   11 __gmon_start__

The following:
http://www.baldric.uwo.ca/~carlos/bug.tar.gz

Will complain on a bad binutils. 

c.


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