gcl-devel
[Top][All Lists]
Advanced

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

RE: [Gcl-devel] BFD related issues - belated reply.


From: Mike Thomas
Subject: RE: [Gcl-devel] BFD related issues - belated reply.
Date: Wed, 7 Jan 2004 16:35:42 +1000

Hi Aurelien.

The problem yesterday was that I was accidentally using the current MinGW32
bfd headers with libs from our CVS which corrupted data in the bfd
structure.

| Could you provide a
| stack trace along with a generous context ?  Then, as
| I've been working on BFD for quite some time now,
| maybe I can come up with a solution.

Thanks once agin for offering to help.  See below for some output from gdb.

Cheers

Mike Thomas.


Stuff deleted:

Processed _sKundefined_function
Processed ___gmpn_sub_n
Processed _close
Processed __imp__fwrite
Processed _sLload
Processed _bfd_i386_arch
Processed _sKappend
Processed _sKcase
OPENING OBJECT FILE ./gazonk0.o
Unknown bfd error code on openr ./gazonk0.o 5
.CALCULATING CURRENT, MAX_ALIGN and ALLOCATING

round_up: address = 0, n = 16, returning 0
Section .text: owner = 67ff20, output_offset = 0, output_section = bfd244
(.text
)
round_up: address = 70, n = 16, returning 112
Section .data: owner = 67ff20, output_offset = 0, output_section = bfd2dc
(.data
)
round_up: address = 80, n = 16, returning 128
Section .bss: owner = 67ff20, output_offset = 0, output_section = bfd374
(.bss)
1
ALLOCATED 144 bytes

max_align = 16, current = 128, cfd_self  = 0, cfd_size  = 90, cfd_start =
5d3ee8

round_up: address = 5d3ee8, n = 16, returning 6110960
max_align = 16, current = 128, cfd_self  = 0, cfd_size  = 88, cfd_start =
5d3ef0

round_up: address = 5d3ef0, n = 16, returning 6110960
Section address bfd244
m loop Section .text: owner = 67ff20, output_offset = 0, output_section =
bfd244
 (.text), vma = 5d3ef0, m = 5d3f60
round_up: address = 5d3f60, n = 16, returning 6111072
Section address bfd2dc
m loop Section .data: owner = 67ff20, output_offset = 0, output_section =
bfd2dc
 (.data), vma = 5d3f60, m = 5d3f70
round_up: address = 5d3f70, n = 16, returning 6111088
Section address bfd374
m loop Section .bss: owner = 67ff20, output_offset = 0, output_section =
bfd374
(.bss), vma = 5d3f70, m = 5d3f70


DOING SOMETHING WITH THE HASHED SYMBOLS

u = 64, v = 15
u loop q[0]->name = gazonk0.c
u loop q[1]->name = _VVi
u loop q[2]->name = _init_code
u loop q[3]->name = _L1
u loop q[4]->name = .text
u loop q[5]->name = .data
u loop q[6]->name = .bss
u loop q[7]->name = .stab
u loop q[8]->name = .stabstr
u loop q[9]->name = _vs_limit
u loop q[10]->name = _vs_base
u loop q[11]->name = _vs_top
u loop q[12]->name = _number_plus
u loop q[13]->name = _vs_overflow
u loop q[14]->name = _do_init


DOING RELOCATIONS

s->name .text, s->flags = 237
About to get reloc section contents
obj_bfd = 67ff20, section .text, s->output_section = bfd244, q = 22fed4

Program received signal SIGSEGV, Segmentation fault.
bfd_getl32 (addr=0x67ff20 "?,=") at libbfd.c:1058
1058      v |= (unsigned long) addr[1] << 8;
(gdb) bt
#0  bfd_getl32 (addr=0x67ff20 "?,=") at libbfd.c:1058
#1  0x0040eb74 in bfd_perform_relocation (abfd=0x67ff20,
reloc_entry=0x609d10,
    data=0x5d3ef0, input_section=0xbfd244, output_bfd=0x0,
    error_message=0x22fe68) at reloc.c:624
#2  0x0040f940 in bfd_generic_get_relocated_section_contents (abfd=0x67ff20,
    link_info=0x455300, link_order=0x455040, data=0x5d3ef0 "\203?\030h",
    relocateable=false, symbols=0x22fed4) at reloc.c:3764
#3  0x004033f5 in bfd_get_relocated_section_contents (abfd=0x67ff20,
    link_info=0x455300, link_order=0x455040, data=0x5d3ef0 "\203?\030h",
    relocateable=false, symbols=0x22fed4) at bfd.c:1258
#4  0x0040290b in main (argc=3, argv=0x3d3ff0) at bfdtest.c:437
(gdb)


and again with a breakpoint:

DOING RELOCATIONS

s->name .text, s->flags = 237
About to get reloc section contents
obj_bfd = 67ff20, section .text, s->output_section = bfd244, q = 22fed4

Breakpoint 1, bfd_perform_relocation (abfd=0x67ff20, reloc_entry=0x609d10,
    data=0x5d3ef0, input_section=0xbfd244, output_bfd=0x0,
    error_message=0x22fe68) at reloc.c:624
624           cont = howto->special_function (abfd, reloc_entry, symbol,
data,
(gdb) s
coff_i386_reloc (abfd=0x67ff20, reloc_entry=0x609d10, symbol=0xda7c8c,
    data=0x5d3ef0, input_section=0xbfd244, output_bfd=0x0,
    error_message=0x22fe68) at coff-i386.c:82
82        if (bfd_is_com_section (symbol->section))
(gdb) n
74      {
(gdb) n
82        if (bfd_is_com_section (symbol->section))
(gdb) n
109           if (output_bfd == (bfd *) NULL)
(gdb) n
111               reloc_howto_type *howto = reloc_entry->howto;
(gdb) n
120               if (howto->pc_relative && howto->pcrel_offset)
(gdb) p howto
No symbol "howto" in current context.
(gdb) p reloc_entry->howto
$10 = (const struct reloc_howto_struct *) 0x414088
(gdb) p *reloc_entry->howto
$11 = {type = 6815520, rightshift = 3997696, size = 13880128,
  bitsize = 13880224, pc_relative = 13880320, bitpos = 13880416,
  complain_on_overflow = 786444, special_function = 0xc0102,
  name = 0x1 <Address 0x1 out of bounds>, partial_inplace = false,
  src_mask = 6331664, dst_mask = 12, pcrel_offset = false}
(gdb) p reloc_entry
$12 = (arelent *) 0x609d10
(gdb) p *reloc_entry
$13 = {sym_ptr_ptr = 0x22fee8, address = 4288856340, addend = 4288856224,
  howto = 0x414088}
(gdb)







reply via email to

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