This is the mail archive of the binutils@sourceware.org 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: debug_info strangeness (arm-mingw32ce)


On Fri, 2009-11-27 at 11:38 +1030, Alan Modra wrote:
> On Thu, Nov 26, 2009 at 08:43:26PM +0100, Danny Backx wrote:
> > Or is it probably what it looks like to me - an error ?
> 
> Yes.  I expect something is corrupting the linker's statement_list,
> since ld appears to be sizing output sections correctly but not
> writing them out.  To test this hypothesis, put a break in
> lang_process before the lang_size_sections call, and another in
> ldwrite.  Dump the list using dprint_statement at both points.

Not being an expert, I don't see much difference. See below.

The following files are on
http://danny.backx.info/download/cegcc/modra/ :

-rw-r--r--    1 4194472  9305         2416 Nov 28 07:18 d2.o
-rw-r--r--    1 4194472  9305        85850 Nov 28 07:19 d2.objdump
-rw-r--r--    1 4194472  9305        85850 Nov 28 07:20 d2b.objdump
-rw-r--r--    1 4194472  9305          426 Nov 28 07:18 doit3
-rw-r--r--    1 4194472  9305          428 Nov 28 07:18 doit3b
-rw-r--r--    1 4194472  9305        33963 Nov 28 07:18 modra-3.1
-rw-r--r--    1 4194472  9305        33977 Nov 28 07:18 modra-3.2
-rw-r--r--    1 4194472  9305        33956 Nov 28 07:18 modra-3b.1
-rw-r--r--    1 4194472  9305        33970 Nov 28 07:18 modra-3b.2

Difference between the "3" and "3b" files is that they're generated by
doit3 and doit3b scripts, meaning with and without empty.o linked in.

The statements in ldwrite.c that write this stuff are
  extern lang_statement_list_type statement_list;
  fprintf(stderr, "Modra 2a\n");
  dprint_statement(statement_list.head, -1);
  fprintf(stderr, "Modra 2b\n");
And similarly (writing Modra 1a/b) in ldlang.c . I assume that this is
what you requested.

	Danny

pavilion: {874} diff modra-3b.?
1c1
< Modra 1a
---
> Modra 2a
35,36c35,36
<                 0x00000000                . = SIZEOF_HEADERS
<                 0x00000000                . = ALIGN
(__section_alignment__)
---
>                 0x00000358                . = SIZEOF_HEADERS
>                 0x00001000                . = ALIGN
(__section_alignment__)
38c38
< .text           0x00011000        0x0
---
> .text           0x00011000      0x798
75c75
<                 0x00011788        0x4 LONG 0x0
---
>                 0x00011788        0x4 LONG 0xffffffff
82c82
<                 0x00011790        0x4 LONG 0x0
---
>                 0x00011790        0x4 LONG 0xffffffff
92c92
< .data           0x00012000        0x0
---
> .data           0x00012000       0x18
157c157
< .rdata          0x00013000        0x0
---
> .rdata          0x00013000       0xf8
184c184
< .idata          0x00014000        0x0
---
> .idata          0x00014000      0x1cc
310c310
< .debug_aranges  0x00015000        0x0
---
> .debug_aranges  0x00015000       0xe0
328c328
<                 0x00016000        0x0
---
>                 0x00016000      0x1f9
350c350
< .debug_info     0x00017000        0x0
---
> .debug_info     0x00017000     0x1488
362c362
< .debug_abbrev   0x00019000        0x0
---
> .debug_abbrev   0x00019000      0x625
373c373
< .debug_line     0x0001a000        0x0
---
> .debug_line     0x0001a000      0x86d
384c384
< .debug_frame    0x0001b000        0x0
---
> .debug_frame    0x0001b000      0x2a8
397c397
< .debug_loc      0x0001c000        0x0
---
> .debug_loc      0x0001c000      0x5b7
421c421
< .debug_ranges   0x0001d000        0x0
---
> .debug_ranges   0x0001d000       0x40
425c425
< Modra 1b
---
> Modra 2b
pavilion: {875} 

-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


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