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]

Re: "undefined ref to _DYNAMIC_LINK" problem in GNU ld


Hi Tao,

> Now it seems the cross compiler can generate object files (not extensively
> tested yet), but the linker doesn't work. When linking a file, it gives
> the following error messages:
>
> LIBDIR/lib/libc.a(init_libc.o): In function `__pthreadAtomThreaded':
> init_libc.o:784: undefined reference to `_BASE_ADDRESS'
> init_libc.o:784: undefined reference to `_DYNAMIC_LINK'
>
> LIBDIR/lib/libc.a(ldr_atexit.o): In function `__ldr_atexit':
> ldr_atexit.o:101: undefined reference to `_DYNAMIC_LINK'
>
> These symbols should be defined by the loader, but maybe GNU ld doesn't do
> that? These symbols look related with shared libraries, but I don't need
> shared library support at all.
>
> Does anybody know how to get around this problem? Maybe manually define
> these symbols in GNU ld?

The simplest way to resolve this would be to define these symbols in a
linker script and then include that script at link time.  See the
linker documentation for how to do this.

Cheers
        Nick
        


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]