bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/11998] New: Bogus linker warning


From: hjl dot tools at gmail dot com
Subject: [Bug ld/11998] New: Bogus linker warning
Date: 9 Sep 2010 17:37:28 -0000

address@hidden tmp]$ cat 
/export/gnu/import/git/binutils/gold/testsuite/memory_test.t
MEMORY
{
  region1        : ORIGIN = 0x1000, LENGTH = 0x1000 ,
  region2 (r)    :    org = 0x2000, len    =    300
  region3 (wx)   :      o = 0x4000, l      =      4
  region4 (!r)   : o = 0x6000 + 60, len    = 0x30 * 0x6
}

SECTIONS
{
  .sec0 : { *(*.sec0) }
  
  .sec1 ORIGIN (region1) : AT(LENGTH (region2)) { *(*.sec1) }

  fred = ORIGIN (region1) + LENGTH (region1) ;
  
  .sec2 : { *(*.sec2) } > region3 AT> region4

  .sec3 0x5000 : { *(*.sec3) }

  /* In theory we could put:

     /DISCARD/ : { *(*) }

     here as we do not need any other sections for this test.
     In practice however doing so breaks GOLD as it relies upon
     being able to create/find various other sections such as
     .dynamic, .dynsym and .gnu.hash.  */
}
address@hidden tmp]$ cat 
/export/gnu/import/git/binutils/gold/testsuite/memory_test.s
        .section .sec0, "a"
        .word 0

        .section .sec1, "a"
        .word 0x11

        .section .sec2, "a"
        .word 0x22

        .section .sec3, "a"
        .word 0x33

        .section .sec4, "a"
        .word 0x44
address@hidden tmp]$ gcc -c -m32
/export/gnu/import/git/binutils/gold/testsuite/memory_test.s
address@hidden tmp]$ ld -m elf_i386  -T
/export/gnu/import/git/binutils/gold/testsuite/memory_test.t memory_test.o -z
max-page-size=0x1000 
ld: a.out: section .sec1 lma 0x12c adjusted to 0x12c
address@hidden tmp]$ 

Why does linker warn "section .sec1 lma 0x12c adjusted to 0x12c"?

-- 
           Summary: Bogus linker warning
           Product: binutils
           Version: 2.21 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: hjl dot tools at gmail dot com
                CC: bug-binutils at gnu dot org


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

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