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: PATCH: Re: hppa64-hp-hpux11.00: invalid string offset for section .dynstr


David, Alan & Jeff,

I have tested the patch and it fixed that problem.  However, it introduces
another one which
could be easy to fix.

#include <stdio.h>
#include <stdlib.h>

static unsigned char* Mandel(int maxColor)
{
  unsigned char* map;
  map  = (unsigned char*)malloc(maxColor * sizeof(unsigned char));
  return map;
}

void *CreateImage(int depth, int width, int height)
{
  return Mandel(128);
}

Binutils ld puts the relocation information into the .rela.dyn but HP ld
puts it into .rela.opd.


Relocation section '.rela.dyn' at offset 0x558 contains 1 entries:
  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
8000000000001010  001300000082 R_PARISC_EPLT     40000000000015f0
.CreateImage +
 0

Relocation section '.rela.plt' at offset 0x570 contains 1 entries:
  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
8000000000001030  001100000081 R_PARISC_IPLT     0000000000000000 malloc +
0

HP ld creates the following shared libary.


Relocation section '.rela.opd' at offset 0x410 contains 1 entries:
  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
8000000100000000  000100000082 R_PARISC_EPLT     40000000000001c8
__text_seg + 330

Relocation section '.rela.plt' at offset 0x428 contains 1 entries:
  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
8000000100000020  000400000081 R_PARISC_IPLT     0000000000000000 malloc +
0

I'm investigating now but I case you can spot the problem straight away, I
send this now.

Many thanks and cheers,

Ross


---------------------------------------------------------------------------------

Ross Alexander                           "He knows no more about his
MIS - NEC Europe Limited            destiny than a tea leaf knows
Work ph: +44 20 8752 3394         the history of East India Company"


                                                                                                                                                      
                      Alan Modra                                                                                                                      
                      <amodra@bigpond.n        To:       John David Anglin <dave@hiauly1.hia.nrc.ca>                                                  
                      et.au>                   cc:       ross.alexander@uk.neceur.com, law@redhat.com, binutils@sources.redhat.com                    
                                               Subject:  Re: PATCH: Re: hppa64-hp-hpux11.00: invalid string offset for section .dynstr                
                      23/06/2002 10:07                                                                                                                
                                                                                                                                                      
                                                                                                                                                      




On Sun, Jun 23, 2002 at 01:42:23AM -0400, John David Anglin wrote:
>            * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions):
New
>            function.
>            (allocate_global_data_dlt):  Don't add millicode symbols to
dynamic
>            symbol table.
>            (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
>            (elf64_hppa_size_dynamic_sections): Revise to use
>            elf64_hppa_mark_milli_and_exported_functions.
>            (elf64_hppa_finish_dynamic_symbol): Remove code to keep
millicode
>            symbols out of dynamic symbol table.

Committed.

--
Alan Modra
IBM OzLabs - Linux Technology Centre






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