This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] _begin missing
- From: Andrew Stubbs <ams at codesourcery dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Thu, 29 Jan 2009 14:46:15 +0000
- Subject: [PATCH] _begin missing
The sed script used to insert the definition of _begin into the linker
script does not always work.
In particular, the lastest SH linker script reads as follows:
. = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS;
whereas the sed script requires:
. = 0 + SIZEOF_HEADERS;
Please apply this patch to match both types of script.
Thanks
Andrew Stubbs
2009-01-29 Andrew Stubbs <ams@codesourcery.com>
* elf/Makefile (ld.so): Adjust the sed script to insert _begin in to
newer linker scripts.
---
src/glibc-mainline/elf/Makefile | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: src/glibc-mainline/elf/Makefile
===================================================================
--- src/glibc-mainline/elf/Makefile.orig
+++ src/glibc-mainline/elf/Makefile
@@ -305,7 +305,7 @@ $(objpfx)ld.so: $(objpfx)librtld.os $(ld
$(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 | \
LC_ALL=C \
sed -e '/^=========/,/^=========/!d;/^=========/d' \
- -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
+ -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
> $@.lds
$(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
$(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now)) \