path: root/Makefile
diff options
authorAdam Litke <agl@us.ibm.com>2008-03-07 21:18:24 +0000
committerNishanth Aravamudan <nacc@us.ibm.com>2008-03-07 16:31:35 -0800
commit844f483968db02c642285543986d941607e0c6bc (patch)
treea47709ec17d1f8b5290834b6cdc49c5ef98a0baf /Makefile
parente18e7ab05ace7c409e3876350444a0dc5c0f5221 (diff)
elflink: Add powerpc64-specific PLT size detection
PowerPC 64-bit binaries place their plt in the uninitialized (normally zeroed) part of the data segment. This placement requires extra copying to be performed in order to preserve symbol lookups that have already been completed by the dynamic linker. Determining the number of additional bytes to copy is platform-specific. Therefore, we use a new mechanism to specify an implementation for elf64ppc. The build system has been modified to notice $ELF{32|64}.c files and, when found, build them into the library. This implementation replaces the somewhat hand-wavy linker script approach we used in the past to work around this discrepancy. NOTE: This functionality was originally part of the script-less relinking patch series. Since it is a good stand-alone fix I have broken it out and am pushing it on its own merit. The mechanism for supplying arch-specific functions has been changed based on a suggestion from David Gibson. Signed-off-by: Adam Litke <agl@us.ibm.com> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Diffstat (limited to 'Makefile')
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a7554b5..e18dba7 100644
--- a/Makefile
+++ b/Makefile
@@ -78,6 +78,9 @@ endif
ifdef ELF64
LIBOBJS64 = obj64/elflink.o obj64/sys-$(ELF64).o
+ifeq ($(ELF64),elf64ppc)
+LIBOBJS64 += obj64/$(ELF64).o
LIBOBJS32 += $(LIBOBJS:%=obj32/%)
LIBOBJS64 += $(LIBOBJS:%=obj64/%)