diff options
Diffstat (limited to 'libelf')
| -rw-r--r-- | libelf/ChangeLog | 6 | ||||
| -rw-r--r-- | libelf/Makefile.am | 4 | ||||
| -rw-r--r-- | libelf/elf_begin.c | 5 |
3 files changed, 11 insertions, 4 deletions
diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 8d1f289d..14001c7a 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,9 @@ +2007-02-04 Ulrich Drepper <[email protected]> + + * Makefile (libelf.so): Build with -z relro. + + * elf_begin.c (read_file): When using ELF_C_READ_MMAP use MAP_PRIVATE. + 2007-01-30 Ulrich Drepper <[email protected]> * nlist.c: Close file descriptor before returning. diff --git a/libelf/Makefile.am b/libelf/Makefile.am index f27d4f0b..b93f49c6 100644 --- a/libelf/Makefile.am +++ b/libelf/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc. +## Copyright (C) 1996-2006, 2007 Red Hat, Inc. ## This file is part of Red Hat elfutils. ## ## Red Hat elfutils is free software; you can redistribute it and/or modify @@ -107,7 +107,7 @@ libelf_so_SOURCES = libelf.so: libelf_pic.a libelf.map $(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ -Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \ - -Wl,--soname,$@.$(VERSION),-z,-defs + -Wl,--soname,$@.$(VERSION),-z,-defs,-z,relro if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi ln -fs $@ $@.$(VERSION) diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c index be52f464..24bac42b 100644 --- a/libelf/elf_begin.c +++ b/libelf/elf_begin.c @@ -1,5 +1,5 @@ /* Create descriptor for processing file. - Copyright (C) 1998-2005, 2006 Red Hat, Inc. + Copyright (C) 1998-2005, 2006, 2007 Red Hat, Inc. This file is part of Red Hat elfutils. Written by Ulrich Drepper <[email protected]>, 1998. @@ -561,6 +561,7 @@ read_file (int fildes, off_t offset, size_t maxsize, ? PROT_READ : PROT_READ|PROT_WRITE), cmd == ELF_C_READ_MMAP_PRIVATE + || cmd == ELF_C_READ_MMAP ? MAP_PRIVATE : MAP_SHARED, fildes, offset); @@ -686,7 +687,7 @@ read_long_names (Elf *elf) /* NUL-terminate the string. */ *runp = '\0'; - /* Skip the NUL bzte and the \012. */ + /* Skip the NUL byte and the \012. */ runp += 2; /* A sanity check. Somebody might have generated invalid |
