bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/9749] New: The section is put not in order


From: uzytkownik2 at gmail dot com
Subject: [Bug binutils/9749] New: The section is put not in order
Date: 16 Jan 2009 01:17:43 -0000

I'm not quite sure if it is a bug or feature request (at least on mailong list
it was pointed out as bug). I try to produce an ELF in multiboot format -
therefore the setup section have to be within 0x2000.

If I add big data to .bss section I recive such layouts:
Gold:
There are 8 section headers, starting at offset 0x8108:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .text             PROGBITS        c0108000 001000 002833 00  AX  0   0  4
  [ 2] .data             PROGBITS        c010b000 004000 000008 00  WA  0   0  4
  [ 3] .bss              NOBITS          c010c000 004008 208110 00  WA  0   0 32
  [ 4] .setup            PROGBITS        00000000 005000 003000 00      0   0 
4096
  [ 5] .comment          PROGBITS        00000000 008000 0000bc 00      0   0  1
  [ 6] .note             NOTE            00000000 0080bc 000018 00      0   0  4
  [ 7] .shstrtab         STRTAB          00000000 0080d4 000032 00      0   0  1

ld:
There are 7 section headers, starting at offset 0x80e8:

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .setup            PROGBITS        00100000 005000 003000 00      0   0 
4096
  [ 2] .text             PROGBITS        c0103000 001000 002833 00  AX  0   0  4
  [ 3] .data             PROGBITS        c0106000 004000 000008 00  WA  0   0  4
  [ 4] .bss              NOBITS          c0107000 004008 208110 00  WA  0   0 32
  [ 5] .comment          PROGBITS        00000000 008000 0000bc 00      0   0  1
  [ 6] .shstrtab         STRTAB          00000000 0080bc 00002c 00      0   0  1

Linker script:
OUTPUT_FORMAT("elf32-i386")
ENTRY(start)
phys = 0x00100000;
virt = 0xC0000000;
SECTIONS
{
        . = phys;
        .setup :
        {
                *(.multiboot)
                *(.setup)
        }
        . += virt;
        . = ALIGN(0x1000);
        .text : AT(ADDR(.text) - virt)
        {
                code = .;
                phys_code = . - virt;
                *(.multiboot)
                *(.text)
        }
        . = ALIGN(0x1000);
        .data : AT(ADDR(.data) - virt)
        {
                data = .;
                phys_data = . - virt;
                *(.multiboot)
                *(.data)
        }
        . = ALIGN(0x1000);
        .bss : AT(ADDR(.bss) - virt)
        {
                bss = .;
                phys_bss = . - virt;
                *(COMMON)
                *(.bss)
        }
        . = ALIGN(0x1000);
        .rodata : AT(ADDR(.rodata) - virt)
        {
                rodata = .;
                phys_rodata = . - virt;
                *(.rodata);
        }
        . = ALIGN(0x1000);
        end = .;
        phys_end = . - virt;
        phys = phys;
        virt = virt;
}

-- 
           Summary: The section is put not in order
           Product: binutils
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: uzytkownik2 at gmail dot com
                CC: bug-binutils at gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=9749

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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