bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/12815] New: Segmentation fault when using a global variable, a


From: address@hidden
Subject: [Bug ld/12815] New: Segmentation fault when using a global variable, a special linker script and emulation elf64mmix
Date: Fri, 27 May 2011 08:45:03 +0000

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

           Summary: Segmentation fault when using a global variable, a
                    special linker script and emulation elf64mmix
           Product: binutils
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: address@hidden
        ReportedBy: address@hidden
              Host: Ubuntu on x86_64
            Target: MMIX
             Build: gcc-4.6.0 with binutils-2.21


I've build a cross-compiler with gcc-4.6.0 and binutils-2.21 for MMIX. There
seems to be a problem with the emulation elf64mmix.

To reproduce the problem, use the following c-file:
----
static unsigned int foo = 2;
int main(void) {
    foo++;
    return 0;
}
----
And the following linker-script:
----
OUTPUT_FORMAT("binary")
ENTRY(start)
SECTIONS
{
    . = 0x8000000000100000;
    .text : AT(ADDR(.text) - 0x8000000000100000)
    {
        *(.text)
        *(.data)
        *(.rodata*)
        *(COMMON*)
        *(.bss*)
    }
}
----

Compiling the c-file and linking it via:
$ mmix-elf-escape-gcc -o test.o -c test.c
$ mmix-elf-escape-ld -m elf64mmix -o test test.o -T ld.conf -nostdlib

produces:
Segmentation fault

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