summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-03-17 09:50:40 +0000
committerkib <kib@FreeBSD.org>2009-03-17 09:50:40 +0000
commit37de637d3128736c24e3f0668ae8f42e58707d4b (patch)
treee5b89c81616c4cb7975b633707ee4312e5178075 /sys/kern
parenta204e02a55660ac3bfa2ba55d4efa17fec9167b2 (diff)
downloadFreeBSD-src-37de637d3128736c24e3f0668ae8f42e58707d4b.zip
FreeBSD-src-37de637d3128736c24e3f0668ae8f42e58707d4b.tar.gz
Use the properly sized types for ELF object header and program headers.
This fixes osrel fetching from the FreeBSD branding note for the 64bit platforms. Reported by: swell.k gmail com Reviewed by: dchagin Tested by: dchagin, swell.k gmail com
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/imgact_elf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index f2bdcf5..5604ea5 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -1330,14 +1330,14 @@ __elfN(check_note)(struct image_params *imgp, Elf_Brandnote *checknote,
int32_t *osrel)
{
const Elf_Note *note, *note_end;
- const Elf32_Phdr *phdr, *pnote;
- const Elf32_Ehdr *hdr;
+ const Elf_Phdr *phdr, *pnote;
+ const Elf_Ehdr *hdr;
const char *note_name;
int i;
pnote = NULL;
- hdr = (const Elf32_Ehdr *)imgp->image_header;
- phdr = (const Elf32_Phdr *)(imgp->image_header + hdr->e_phoff);
+ hdr = (const Elf_Ehdr *)imgp->image_header;
+ phdr = (const Elf_Phdr *)(imgp->image_header + hdr->e_phoff);
for (i = 0; i < hdr->e_phnum; i++) {
if (phdr[i].p_type == PT_NOTE) {
OpenPOWER on IntegriCloud