diff options
author | sjg <sjg@FreeBSD.org> | 2013-04-12 20:48:55 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2013-04-12 20:48:55 +0000 |
commit | 97d8b9495668afa398ab17c8c5f7e223b5fd2e89 (patch) | |
tree | 54038c9ac32a45f8741dcc23fb9a8ffc0e15ff89 /libexec | |
parent | 5ee3bfdb338e7c80af29a67f4425c4be24c7b866 (diff) | |
parent | 086d73aef6d0ab7d21daa2076fdc8d25961f9b05 (diff) | |
download | FreeBSD-src-97d8b9495668afa398ab17c8c5f7e223b5fd2e89.zip FreeBSD-src-97d8b9495668afa398ab17c8c5f7e223b5fd2e89.tar.gz |
sync from head
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/mail.local/Makefile | 5 | ||||
-rw-r--r-- | libexec/rtld-elf/map_object.c | 2 | ||||
-rw-r--r-- | libexec/rtld-elf/powerpc64/reloc.c | 14 | ||||
-rw-r--r-- | libexec/smrsh/Makefile | 5 |
4 files changed, 6 insertions, 20 deletions
diff --git a/libexec/mail.local/Makefile b/libexec/mail.local/Makefile index 1487dec..3e59609 100644 --- a/libexec/mail.local/Makefile +++ b/libexec/mail.local/Makefile @@ -12,11 +12,6 @@ CFLAGS+=-I${SENDMAIL_DIR}/include -I. WARNS?= 2 WFORMAT=0 -# Unfortunately, clang gives warnings about sendmail code that cannot -# be turned off yet. Since this is contrib code, and we don't really -# care about the warnings, just make them non-fatal for now. -NO_WERROR.clang= - LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 79e4132..0f75cca 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -175,7 +175,7 @@ map_object(int fd, const char *path, const struct stat *sb) base_vaddr = trunc_page(segs[0]->p_vaddr); base_vlimit = round_page(segs[nsegs]->p_vaddr + segs[nsegs]->p_memsz); mapsize = base_vlimit - base_vaddr; - base_addr = hdr->e_type == ET_EXEC ? (caddr_t) base_vaddr : NULL; + base_addr = (caddr_t) base_vaddr; mapbase = mmap(base_addr, mapsize, PROT_NONE, MAP_ANON | MAP_PRIVATE | MAP_NOCORE, -1, 0); diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c index b13500f..fb5325f 100644 --- a/libexec/rtld-elf/powerpc64/reloc.c +++ b/libexec/rtld-elf/powerpc64/reloc.c @@ -486,8 +486,7 @@ init_pltgot(Obj_Entry *obj) void allocate_initial_tls(Obj_Entry *list) { - register Elf_Addr **tp __asm__("r13"); - Elf_Addr **_tp; + Elf_Addr **tp; /* * Fix the size of the static TLS block by using the maximum @@ -497,22 +496,19 @@ allocate_initial_tls(Obj_Entry *list) tls_static_space = tls_last_offset + tls_last_size + RTLD_STATIC_TLS_EXTRA; - _tp = (Elf_Addr **) ((char *)allocate_tls(list, NULL, TLS_TCB_SIZE, 16) + tp = (Elf_Addr **) ((char *)allocate_tls(list, NULL, TLS_TCB_SIZE, 16) + TLS_TP_OFFSET + TLS_TCB_SIZE); - /* - * XXX gcc seems to ignore 'tp = _tp;' - */ - - __asm __volatile("mr %0,%1" : "=r"(tp) : "r"(_tp)); + __asm __volatile("mr 13,%0" :: "r"(tp)); } void* __tls_get_addr(tls_index* ti) { - register Elf_Addr **tp __asm__("r13"); + Elf_Addr **tp; char *p; + __asm __volatile("mr %0,13" : "=r"(tp)); p = tls_get_addr_common((Elf_Addr**)((Elf_Addr)tp - TLS_TP_OFFSET - TLS_TCB_SIZE), ti->ti_module, ti->ti_offset); diff --git a/libexec/smrsh/Makefile b/libexec/smrsh/Makefile index 0de820d..ae86155 100644 --- a/libexec/smrsh/Makefile +++ b/libexec/smrsh/Makefile @@ -17,11 +17,6 @@ LDADD= ${LIBSM} WARNS?= 2 -# Unfortunately, clang gives warnings about sendmail code that cannot -# be turned off yet. Since this is contrib code, and we don't really -# care about the warnings, just make them non-fatal for now. -NO_WERROR.clang= - SRCS+= sm_os.h CLEANFILES+=sm_os.h |