diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2013-06-14 16:39:36 +0100 |
---|---|---|
committer | Ian Jackson <Ian.Jackson@eu.citrix.com> | 2013-06-14 16:39:36 +0100 |
commit | 66fe2726fe8492676f9970b9c2c511bce6186ece (patch) | |
tree | 702597668feac7320db2beb7bbc575de8fbf4a57 /tools | |
parent | 39bf7b9d0ae534491745e54df5232127c0bddaf1 (diff) | |
download | xen-66fe2726fe8492676f9970b9c2c511bce6186ece.tar.gz xen-66fe2726fe8492676f9970b9c2c511bce6186ece.tar.bz2 xen-66fe2726fe8492676f9970b9c2c511bce6186ece.zip |
libelf: abolish obsolete macros
Abolish ELF_PTRVAL_[CONST_]{CHAR,VOID}; change uses to elf_ptrval.
Abolish ELF_HANDLE_DECL_NONCONST; change uses to ELF_HANDLE_DECL.
Abolish ELF_OBSOLETE_VOIDP_CAST; simply remove all uses.
No functional change. (Verified by diffing assembler output.)
This is part of the fix to a security issue, XSA-55.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
v2: New patch.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxc/xc_dom_elfloader.c | 8 | ||||
-rw-r--r-- | tools/xcutils/readnotes.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/libxc/xc_dom_elfloader.c b/tools/libxc/xc_dom_elfloader.c index 3b835ee5d6..f2bc2f597e 100644 --- a/tools/libxc/xc_dom_elfloader.c +++ b/tools/libxc/xc_dom_elfloader.c @@ -114,9 +114,9 @@ static elf_errorstatus xc_dom_load_elf_symtab(struct xc_dom_image *dom, struct elf_binary *elf, bool load) { struct elf_binary syms; - ELF_HANDLE_DECL_NONCONST(elf_shdr) shdr; ELF_HANDLE_DECL(elf_shdr) shdr2; + ELF_HANDLE_DECL(elf_shdr) shdr; ELF_HANDLE_DECL(elf_shdr) shdr2; xen_vaddr_t symtab, maxaddr; - ELF_PTRVAL_CHAR hdr; + elf_ptrval hdr; size_t size; unsigned h, count, type, i, tables = 0; unsigned long *strtab_referenced = NULL; @@ -240,7 +240,7 @@ static elf_errorstatus xc_dom_load_elf_symtab(struct xc_dom_image *dom, for ( h = 0; h < count; h++ ) { - shdr = ELF_OBSOLETE_VOIDP_CAST elf_shdr_by_index(&syms, h); + shdr = elf_shdr_by_index(&syms, h); if ( !elf_access_ok(elf, ELF_HANDLE_PTRVAL(shdr), 1) ) /* input has an insane section header count field */ break; @@ -276,7 +276,7 @@ static elf_errorstatus xc_dom_load_elf_symtab(struct xc_dom_image *dom, if ( load ) { shdr2 = elf_shdr_by_index(elf, h); - elf_memcpy_safe(elf, ELF_OBSOLETE_VOIDP_CAST elf_section_start(&syms, shdr), + elf_memcpy_safe(elf, elf_section_start(&syms, shdr), elf_section_start(elf, shdr2), size); } diff --git a/tools/xcutils/readnotes.c b/tools/xcutils/readnotes.c index 2ca7732e2d..5fa445eec3 100644 --- a/tools/xcutils/readnotes.c +++ b/tools/xcutils/readnotes.c @@ -80,7 +80,7 @@ static void print_l1_mfn_valid_note(const char *prefix, struct elf_binary *elf, ELF_HANDLE_DECL(elf_note) note) { unsigned descsz = elf_uval(elf, note, descsz); - ELF_PTRVAL_CONST_VOID desc = elf_note_desc(elf, note); + elf_ptrval desc = elf_note_desc(elf, note); /* XXX should be able to cope with a list of values. */ switch ( descsz / 2 ) |