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: mainline ld on mingw32/pe is broken, returns 1 without error.


On Mon, Jun 28, 2004 at 12:16:20AM -0500, Aaron W. LaFramboise wrote:
> (gdb) p *section
> $2 = {name = 0x4b9f45 ".stabstr", id = 21, index = 5, next = 0x0,
>   flags = 66064, user_set_vma = 0, linker_mark = 1, linker_has_input = 0,
>   gc_mark = 0, segment_mark = 0, sec_info_type = 0, use_rela_p = 0,
>   has_tls_reloc = 0, has_gp_reloc = 0, need_finalize_relax = 0,
>   reloc_done = 0, vma = 0, lma = 0, size = 480930, rawsize = 0,
>   output_offset = 0, output_section = 0x3de92c, alignment_power = 0,
>   relocation = 0x0, orelocation = 0x0, reloc_count = 0, filepos = 0,
>   rel_filepos = 0, line_filepos = 0, userdata = 0x0, contents = 0x0,
>   lineno = 0x0, lineno_count = 0, entsize = 0, comdat = 0x0,
>   kept_section = 0x0, moving_line_filepos = 0, target_index = 0,
>   used_by_bfd = 0x0, constructor_chain = 0x0, owner = 0x3df0b8,
>   symbol = 0x6d6ae8, symbol_ptr_ptr = 0x6d7768, link_order_head = 0x0,
>   link_order_tail = 0x0}

Sigh.  This has to be the stabstr section created at stabs.c:248 (if
the section came from an input file, it wouldn't have filepos == 0).

It looks like the linker relies on raw size being zero for these
sections.  ie. places where I do o->rawsize ? o->rawsize : o->size
are broken.  The fix will be to set rawsize for all input sections,
and remove all the places I test rawsize.

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