arm-wince-pe-ld: Trouble creating DLL

Nick Clifton nickc@redhat.com
Mon Nov 18 04:21:00 GMT 2002


Hi Craig,

> I am trying to create a DLL using an arm-wince-pe cross-compile of
> binutils2.13 on RedHat 7.1/x86.  I am using GCC 3.2 that I compiled
> for arm-wince-pe myself.  I have been able to link .exe's, but when
> I try to create a DLL, I get the following error:
> 
> arm-wince-pe-ld: ERROR:
> ../../../lib/libcorelibc.a(obj/ARM/SA1100/CE/retail/dllmain.obj.b)
> is compiled as absolute position code, whereas target HelloWorld.dll
> is position independent
> 
> I am trying to link against M$ system dll's from EVC 3.0.

It appears that the M$ compiler and GCC disagree about how the flag
bits in f_flags field of the PE file header should be
set/interpretated. 

> Is there anything that I can do differently with the link so that
> I can create DLL's?  Any ideas or suggestions??

The simplest solution would be to locate and disable this error
message in the linker.  Assuming that you are sure that the binaries
should be compatable, then edit the function
coff_arm_merge_private_bfd_data() in bfd/coff-arm.h and disable the
check of the PIC_FLAG.  Rebuild/reinstall the linker and see how you
go.

Cheers
        Nick



More information about the Binutils mailing list