Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Nov 2010 17:27:56 +0300
From:      Anonymous <swell.k@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   rtld + gold linker, cannot find entry symbol lf; defaulting to 00000000000034d0
Message-ID:  <86sjz8lytv.fsf@gmail.com>

next in thread | raw e-mail | index | archive | help
I'm trying to compile dynamic linker with `gold' linker.
During build with normal ld(1) there is a warning

  cc [...] -elf -o ld-elf.so.1
  LOCALBASE/bin/ld: warning: cannot find entry symbol lf; defaulting to 00000000000034d0

While it doesn't seem to affect `ld' it does for `gold'. The binary produced
by `gold' segfaults, e.g.

  # from /head@215110
  Core was generated by `sh'.
  Program terminated with signal 11, Segmentation fault.
  #0  .rtld_start () at /usr/src/libexec/rtld-elf/amd64/rtld_start.S:33
  33              xorq    %rbp,%rbp               # Clear frame pointer for good form
  (gdb) bt
  #0  .rtld_start () at /usr/src/libexec/rtld-elf/amd64/rtld_start.S:33
  #1  0x0000000000000001 in ?? ()
  #2  0x00007fffffff0fe0 in ?? ()
  #3  0x0000000000000000 in ?? ()

So, is `-elf' intended or it can be removed?

%%
diff --git a/libexec/rtld-elf/amd64/Makefile.inc b/libexec/rtld-elf/amd64/Makefile.inc
index b265a9d..4ecf82f 100644
--- a/libexec/rtld-elf/amd64/Makefile.inc
+++ b/libexec/rtld-elf/amd64/Makefile.inc
@@ -1,7 +1,5 @@
 # $FreeBSD$
 
-CFLAGS+=	-elf
-LDFLAGS+=	-elf
 # Uncomment this to build the dynamic linker as an executable instead
 # of a shared library:
 #LDSCRIPT=	${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x
diff --git a/libexec/rtld-elf/i386/Makefile.inc b/libexec/rtld-elf/i386/Makefile.inc
index b265a9d..4ecf82f 100644
--- a/libexec/rtld-elf/i386/Makefile.inc
+++ b/libexec/rtld-elf/i386/Makefile.inc
@@ -1,7 +1,5 @@
 # $FreeBSD$
 
-CFLAGS+=	-elf
-LDFLAGS+=	-elf
 # Uncomment this to build the dynamic linker as an executable instead
 # of a shared library:
 #LDSCRIPT=	${.CURDIR}/${MACHINE_CPUARCH}/elf_rtld.x
%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86sjz8lytv.fsf>