bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/15428] New: Linker crash on R_MIPS_GOT_PAGE relocations referrin


From: address@hidden
Subject: [Bug ld/15428] New: Linker crash on R_MIPS_GOT_PAGE relocations referring to absolute symbols
Date: Thu, 02 May 2013 00:25:35 +0000

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

             Bug #: 15428
           Summary: Linker crash on R_MIPS_GOT_PAGE relocations referring
                    to absolute symbols
           Product: binutils
           Version: 2.24 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified
            Target: mips-linux-gnu


Given this program:

$ cat assign.s
    .abicalls
    .text
    .weak    assign
    .globl    __start
    .ent    __start
    .frame    $29, 0, $31
    .mask    0x00000000, 0
__start:
    .cplocal $2
    .cpsetup $t9, $zero, __start
    lw    $2, assign
    jr    $31
    .end    __start
$

and this linker script:

$ cat assign.ld
ENTRY (__start)
SECTIONS
{
  . = 0x12300000 + SIZEOF_HEADERS;
  .text : { *(.text) }
  . = 0x23400000;
  assign = .;
  HIDDEN (_gp = ALIGN (16) + 0x7ff0);
  .got : { *(.got) }
}
$

I get a segmentation fault in LD:

$ mips-linux-gnu-as -64 -o assign.o assign.s
$ mips-linux-gnu-ld -melf64btsmip -T assign.ld -o assign assign.o
Segmentation fault
$

This happens to be in bfd_zalloc called from mips_elf_record_got_page_entry
because "assign" is an absolute symbol and therefore it's section's owner
member is set to NULL.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

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