1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
freebsd/lib/libelf
Joseph Koshy f6c0f35e07 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]
2006-12-25 02:22:22 +00:00
..
_libelf.h Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00
elf_begin.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_begin.c
elf_cntl.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_cntl.c
elf_data.c
elf_end.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_end.c
elf_errmsg.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_errmsg.c Make the generated message from `elf_errmsg(-1)' a little more readable. 2006-12-09 16:27:15 +00:00
elf_errno.c
elf_fill.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_fill.c
elf_flag.c
elf_flagdata.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_getarhdr.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_getarhdr.c
elf_getarsym.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_getarsym.c
elf_getbase.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_getbase.c
elf_getdata.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_getident.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_getident.c
elf_getphnum.3 Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00
elf_getscn.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_getshnum.3 Fix a typo. 2006-12-16 10:45:43 +00:00
elf_getshstrndx.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_hash.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_hash.c
elf_kind.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_kind.c
elf_memory.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_memory.c
elf_next.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_next.c
elf_phnum.c Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00
elf_rand.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_rand.c
elf_rawfile.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_rawfile.c
elf_scn.c Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00
elf_shnum.c Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00
elf_shstrndx.c Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00
elf_strptr.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_strptr.c
elf_types.m4 Use <osreldate.h> rather than the OS version reported by the kernel 2006-12-18 05:40:01 +00:00
elf_update.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_update.c Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00
elf_version.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
elf_version.c
elf.3 Document the ELF types supported by libelf. 2006-12-11 09:03:27 +00:00
gelf_cap.c Use <osreldate.h> rather than the OS version reported by the kernel 2006-12-18 05:40:01 +00:00
gelf_checksum.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_checksum.c
gelf_dyn.c
gelf_ehdr.c
gelf_fsize.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_fsize.c
gelf_getcap.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_getclass.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_getclass.c
gelf_getdyn.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_getehdr.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_getmove.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_getphdr.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_getrel.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_getrela.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_getshdr.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_getsym.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_getsyminfo.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_getsymshndx.3 Name the functions documented by this manual page correctly. 2006-12-13 15:14:46 +00:00
gelf_move.c Use <osreldate.h> rather than the OS version reported by the kernel 2006-12-18 05:40:01 +00:00
gelf_newehdr.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_newphdr.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_phdr.c
gelf_rel.c
gelf_rela.c
gelf_shdr.c
gelf_sym.c
gelf_syminfo.c Use <osreldate.h> rather than the OS version reported by the kernel 2006-12-18 05:40:01 +00:00
gelf_symshndx.c
gelf_update_ehdr.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf_xlate.c
gelf_xlatetof.3 Fix minor formatting issues: 2006-11-13 09:46:16 +00:00
gelf.3
gelf.h Use <osreldate.h> rather than the OS version reported by the kernel 2006-12-18 05:40:01 +00:00
libelf_align.c Use the correct value of __FreeBSD_version. 2006-12-18 05:36:23 +00:00
libelf_allocate.c
libelf_ar.c Use strncpy() instead of strlcpy() when copying members of 2006-12-25 02:06:32 +00:00
libelf_checksum.c Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00
libelf_convert.m4 Use <osreldate.h> rather than the OS version reported by the kernel 2006-12-18 05:40:01 +00:00
libelf_data.c Use the correct value of __FreeBSD_version. 2006-12-18 05:36:23 +00:00
libelf_ehdr.c Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00
libelf_extended.c Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00
libelf_fsize.m4 Use <osreldate.h> rather than the OS version reported by the kernel 2006-12-18 05:40:01 +00:00
libelf_msize.m4 Use <osreldate.h> rather than the OS version reported by the kernel 2006-12-18 05:40:01 +00:00
libelf_phdr.c Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00
libelf_shdr.c
libelf_xlate.c Correct a logic error. 2006-12-24 09:45:10 +00:00
libelf.c
libelf.h
Makefile Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00
Version.map Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx' 2006-12-25 02:22:22 +00:00