Summary: | Segmentation fault when using a global variable, a special linker script and emulation elf64mmix | ||
---|---|---|---|
Product: | binutils | Reporter: | Nils Asmussen <nils> |
Component: | ld | Assignee: | Hans-Peter Nilsson <hp> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hp, nils |
Priority: | P2 | ||
Version: | 2.21 | ||
Target Milestone: | --- | ||
Host: | Ubuntu on x86_64 | Target: | MMIX |
Build: | gcc-4.6.0 with binutils-2.21 | Last reconfirmed: | |
Attachments: | Object file, that causes the error |
Description
Nils Asmussen
2011-05-27 08:44:38 UTC
After playing around a bit with the linker-script, I've found out, that the only problem seems to be that I would like to have OUTPUT_FORMAT "binary" instead of "elf64-mmix". As soon as I use "elf64-mmix", it works. Can you please attach test.o, the object file? Thanks. While it's definitely a bug that the linker segfaults, generating a "binary" file is generally better done using objcopy. Created attachment 5758 [details]
Object file, that causes the error
Ok, repeated. CVSROOT: /cvs/src Module name: src Changes by: hp@sourceware.org 2011-07-25 01:14:20 Modified files: bfd : ChangeLog elf64-mmix.c Log message: PR ld/12815 * elf64-mmix.c (struct _mmix_elf_section_data): New members has_warned_bpo and has_warned_pushj. (mmix_final_link_relocate): Remove PARAMS and PTR macros, converting to ISO C. Add new parameter error_message. All callers changed. (mmix_elf_perform_relocation): Ditto. <case R_MMIX_PUSHJ_STUBBABLE, case R_MMIX_BASE_PLUS_OFFSET>: Handle the case where mmix_elf_check_common_relocs has not been called, missing preparations for relocs of the respective type. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5429&r2=1.5430 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf64-mmix.c.diff?cvsroot=src&r1=1.63&r2=1.64 CVSROOT: /cvs/src Module name: src Changes by: hp@sourceware.org 2011-07-25 01:16:05 Modified files: ld/testsuite : ChangeLog Added files: ld/testsuite/ld-mmix: pr12815-1.d pr12815-1.s pr12815-1.ld pr12815-2.d pr12815-2.s Log message: PR ld/12815 * ld-mmix/pr12815-1.d, ld-mmix/pr12815-1.s, ld-mmix/pr12815-1.ld, ld-mmix/pr12815-2.d, ld-mmix/pr12815-2.s: New tests. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ChangeLog.diff?cvsroot=src&r1=1.1447&r2=1.1448 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-mmix/pr12815-1.d.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-mmix/pr12815-1.s.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-mmix/pr12815-1.ld.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-mmix/pr12815-2.d.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-mmix/pr12815-2.s.diff?cvsroot=src&r1=NONE&r2=1.1 Will instead error gracefully starting with binutils-2.22. See <http://sourceware.org/ml/binutils/2011-07/msg00199.html>. If the error message isn't helpful enough, please suggest improvements here or on the list. Thanks for the report. |