This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello, I am experiencing problems with recent GNU ld packages. The short version is that the COFF object file reader seems to not determine the .text section correct size, thus ld panics, complaining about a bad relocation. I have also to make clear, that though i experience this using cross compiling tools (linux->win32), cygwin users have the same problems, that's why i post this bug report here (the binutils-bug list seems to be a spam list) Here is a more detailed report: ------------------------------------------------------------------------ The buggy coff file can be obtained thanks to the assembly file attached. This is the most reduced code i could do that triggers the bug. $ nasm -f win32 -DPREFIX -o ld-bug.obj ld-bug.asm When trying to link that file, i always have this error with GNU ld 2.14 (no errors with GNU ld 2.13): ld-bug.obj: bad reloc address 0xa1 in section `.text' So here we go, with a GNU ld 2.13, objdump -x reports that (only relevent parts): $ i386-mingw32-objdump -x ld-bug.obj [...] Sections: Idx Nom Taille VMA LMA Fich off Algn 0 .data 0000000c 00000000 00000000 00000064 2**2 CONTENTS, ALLOC, LOAD, DATA 1 .text 000000f3 00000000 00000000 00000070 2**4 CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE [...] But GNU ld 2.14 (and current head cvs as well): [...] Sections: Idx Nom Taille VMA LMA Fich off Algn 0 .data 0000000c 00000000 00000000 00000064 2**2 CONTENTS, ALLOC, LOAD, DATA 1 .text 0000000c 00000000 00000000 00000070 2**4 CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE [...] Note that the .text section is wrong in the second case. I tried to debug GNU ld to find where the (section_type_struct)->_raw_size field was set... but no luck. Is there in this list a GNU ld (coff) guru wanting to help me track the the bug ? -- Edouard Gomez
Attachment:
ld-bug.asm
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |