cvs commit: src/lib/libelf Makefile Version.map _libelf.h elf_getphnum.3 elf_phnum.c elf_scn.c elf_shnum.c elf_shstrndx.c elf_update.c libelf_checksum.c libelf_ehdr.c libelf_extended.c libelf_phdr.c

Joseph Koshy jkoshy at FreeBSD.org
Sun Dec 24 18:22:23 PST 2006


jkoshy      2006-12-25 02:22:23 UTC

  FreeBSD src repository

  Modified files:
    lib/libelf           Makefile Version.map _libelf.h elf_scn.c 
                         elf_shnum.c elf_shstrndx.c elf_update.c 
                         libelf_checksum.c libelf_ehdr.c 
                         libelf_phdr.c 
  Added files:
    lib/libelf           elf_getphnum.3 elf_phnum.c 
                         libelf_extended.c 
  Log:
  Keep shadow copies of the `e_shnum', `e_phnum' and `e_shstrndx'
  members of the ELF Executable Header inside the library-private
  `struct _Elf' descriptor and only update the underlying Elf{32,64}_Ehdr
  structure on an elf_update(3) call.  These fields of the Ehdr
  structure are technically `out of bounds' for an application program
  per the ELF(3) API, but we've seen applications that initialize
  a new Ehdr structure using memcpy(), messing up the library's
  invariants. [1]
  
  Implement elf_getphnum() and handle ELF objects with more than
  64K program header table entries.
  
  Reported by:    jb [1]
  
  Revision  Changes    Path
  1.5       +3 -0      src/lib/libelf/Makefile
  1.2       +1 -0      src/lib/libelf/Version.map
  1.2       +5 -3      src/lib/libelf/_libelf.h
  1.1       +87 -0     src/lib/libelf/elf_getphnum.3 (new)
  1.1       +53 -0     src/lib/libelf/elf_phnum.c (new)
  1.2       +26 -42    src/lib/libelf/elf_scn.c
  1.2       +7 -77     src/lib/libelf/elf_shnum.c
  1.2       +7 -65     src/lib/libelf/elf_shstrndx.c
  1.2       +11 -7     src/lib/libelf/elf_update.c
  1.2       +1 -1      src/lib/libelf/libelf_checksum.c
  1.2       +82 -3     src/lib/libelf/libelf_ehdr.c
  1.1       +136 -0    src/lib/libelf/libelf_extended.c (new)
  1.2       +13 -21    src/lib/libelf/libelf_phdr.c


More information about the cvs-src mailing list