arm-pe-gcc -o cqppc tq.o cmdfuncs.o sdlpixel.o SDLmain.lib SDL.lib SDL.dll /usr/cross/arm-wince/lib/gcc/arm-pe/3.4.2/../../../../arm-pe/bin/ld: internal error: aborting at /usr/cross/binutils-2.15.91-20040904-1/ld/pe-dll.c line 1765 in make_one /usr/cross/arm-wince/lib/gcc/arm-pe/3.4.2/../../../../arm-pe/bin/ld: please report this bug collect2: ld returned 1 exit status Does not crash, but experiences link errors, if SDL.dll is ommited
Subject: Re: New: error linking dll on pe Hi cal, > arm-pe-gcc -o cqppc tq.o cmdfuncs.o sdlpixel.o SDLmain.lib SDL.lib SDL.dll > /usr/cross/arm-wince/lib/gcc/arm-pe/3.4.2/../../../../arm-pe/bin/ld: internal > error: aborting at /usr/cross/binutils-2.15.91-20040904-1/ld/pe-dll.c line 1765 > in make_one > /usr/cross/arm-wince/lib/gcc/arm-pe/3.4.2/../../../../arm-pe/bin/ld: please > report this bug > collect2: ld returned 1 exit status Please could you provide a way for us to reproduce this bug. Preferably as small and as simple as possible. Cheers Nick
Subject: Re: error linking dll on pe --Original Message-- From: sourceware-bugzilla@sources.redhat.com Sent: 2 Feb 2005 10:43:52 -0000 To: cal@splitreflection.com Subject: [Bug ld/698] error linking dll on pe > > ------- Additional Comments From nickc at redhat dot com 2005-02-02 10:43 ------- > Subject: Re: New: error linking dll on pe > > Hi cal, > > > arm-pe-gcc -o cqppc tq.o cmdfuncs.o sdlpixel.o SDLmain.lib SDL.lib SDL.dll > > /usr/cross/arm-wince/lib/gcc/arm-pe/3.4.2/../../../../arm-pe/bin/ld: internal > > error: aborting at /usr/cross/binutils-2.15.91-20040904-1/ld/pe-dll.c line 1765 > > in make_one > > /usr/cross/arm-wince/lib/gcc/arm-pe/3.4.2/../../../../arm-pe/bin/ld: please > > report this bug > > collect2: ld returned 1 exit status > > > Please could you provide a way for us to reproduce this bug. Preferably > as small and as simple as possible. > > Cheers > Nick > I've looked at the source code where the error message indicates, pe-dll.c function make_one, and it's clear that the code to support the arm processor with that function just isn't there. So anything built for that processor linking against a dll should reproduce that error. I'd code a fix myself except that it requires some very processor specific data. > > > > -- > > > http://sources.redhat.com/bugzilla/show_bug.cgi?id=698 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. >
Subject: Re: error linking dll on pe The SDL library build I'm using can be gotten through http://article.gmane.org/gmane.comp.lib.sdl/19943 Attatched is a throwaway program using SDL, to be linked against SDLmain.lib SDL.lib and SDL.dll --Original Message-- From: Nick Clifton <nickc@redhat.com> Sent: Mon, 07 Feb 2005 16:55:31 +0000 To: sourceware-bugzilla@sources.redhat.com, cal@splitreflection.com Subject: Re: [Bug ld/698] error linking dll on pe > Hi Cal, > > [Sourceware appears to be down at the moment, so I am sending this > directly to you]. > > > > I've looked at the source code where the error message indicates, pe-dll.c function make_one, and it's clear that the code to support the arm processor with that function just isn't there. So anything built for that processor linking against a dll should reproduce that error. > > Indeed - but with a small test case I can test a fix that will at least > remove the abort and replace it with a sensible error message. (My > point being that I am not overly familiar with the ARM PE environment, > so it is going to be much easier for you to create a small testcase than > it is for me to guess how to built a DLL and then an suitable object > file and then try to link them together). > > Cheers > Nick >
Created attachment 398 [details] sfresize.c
Subject: Re: error linking dll on pe Hi Cal, [Sourceware appears to be down at the moment, so I am sending this directly to you]. > I've looked at the source code where the error message indicates, pe-dll.c function make_one, and it's clear that the code to support the arm processor with that function just isn't there. So anything built for that processor linking against a dll should reproduce that error. Indeed - but with a small test case I can test a fix that will at least remove the abort and replace it with a sensible error message. (My point being that I am not overly familiar with the ARM PE environment, so it is going to be much easier for you to create a small testcase than it is for me to guess how to built a DLL and then an suitable object file and then try to link them together). Cheers Nick
Hi Peter, Thanks for supplying a test case. Unfortunatley it does not compile as it needs a header file SDL.h which was not supplied and it uses a function SDL_LoadBMP which does not appear to be in the supplied libraries. Instead I used this source as my test example: extern void * SDL_LoadBMP_RW (const char *); void * src; int main (void) {src = SDL_LoadBMP_RW ("font1.bmp");} With this I was able to reproduce the problem and I now have a patch which changes the abort() into a more suitable error message. Please try the attached patch and let me know what you think. Cheers Nick
Created attachment 399 [details] Proposed patch
By inspection of pe-dll.c it looks like this has been fixed.