Date: Sat, 15 Dec 2007 02:49:53 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 130928 for review Message-ID: <200712150249.lBF2nrjD097475@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=130928 Change 130928 by jb@jb_freebsd1 on 2007/12/15 02:48:57 MFdtrace Affected files ... .. //depot/projects/dtrace7/src/lib/libelf/elf_strptr.c#2 edit .. //depot/projects/dtrace7/src/lib/libelf/libelf_align.c#2 edit .. //depot/projects/dtrace7/src/lib/libelf/libelf_data.c#2 edit .. //depot/projects/dtrace7/src/lib/libelf/libelf_xlate.c#2 edit Differences ... ==== //depot/projects/dtrace7/src/lib/libelf/elf_strptr.c#2 (text+ko) ==== @@ -55,7 +55,7 @@ gelf_getshdr(s, &shdr) == NULL) return (NULL); - if (shdr.sh_type != SHT_STRTAB || + if (/*shdr.sh_type != SHT_STRTAB || */ offset >= shdr.sh_size) { LIBELF_SET_ERROR(ARGUMENT, 0); return (NULL); ==== //depot/projects/dtrace7/src/lib/libelf/libelf_align.c#2 (text+ko) ==== @@ -122,7 +122,7 @@ #endif [ELF_T_MOVEP] = UNSUPPORTED(), #if __FreeBSD_version >= 700025 - [ELF_T_NOTE] = FALIGN(4,4), + [ELF_T_NOTE] = FALIGN(1,1), #endif [ELF_T_OFF] = FALIGN(4,8), [ELF_T_PHDR] = FALIGN(4,8), ==== //depot/projects/dtrace7/src/lib/libelf/libelf_data.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libelf/libelf_data.c,v 1.2 2006/12/18 05:36:23 jkoshy Exp $"); +__FBSDID("$FreeBSD: src/lib/libelf/libelf_data.c,v 1.3 2007/11/23 11:29:36 jkoshy Exp $"); #include <libelf.h> #include <osreldate.h> @@ -72,7 +72,7 @@ case SHT_GNU_verneed: /* == SHT_SUNW_verneed */ return (ELF_T_VNEED); case SHT_GNU_versym: /* == SHT_SUNW_versym */ - return (-1); /* XXX */ + return (ELF_T_HALF); case SHT_SUNW_move: return (ELF_T_MOVE); case SHT_SUNW_syminfo: ==== //depot/projects/dtrace7/src/lib/libelf/libelf_xlate.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libelf/libelf_xlate.c,v 1.2 2006/12/24 09:45:10 jkoshy Exp $"); +__FBSDID("$FreeBSD: src/lib/libelf/libelf_xlate.c,v 1.3 2007/11/26 03:09:33 jkoshy Exp $"); #include <assert.h> #include <libelf.h> @@ -68,8 +68,7 @@ return (NULL); } - if (src->d_buf == NULL || dst->d_buf == NULL || - src->d_size == 0) { + if (src->d_buf == NULL || dst->d_buf == NULL) { LIBELF_SET_ERROR(DATA, 0); return (NULL); } @@ -79,8 +78,8 @@ return (NULL); } - if ((fsz = (elfclass == ELFCLASS32 ? elf32_fsize : elf64_fsize)(src->d_type, - (size_t) 1, src->d_version)) == 0) + if ((fsz = (elfclass == ELFCLASS32 ? elf32_fsize : elf64_fsize) + (src->d_type, (size_t) 1, src->d_version)) == 0) return (NULL); msz = _libelf_msize(src->d_type, elfclass, src->d_version); @@ -133,8 +132,8 @@ dst->d_type = src->d_type; dst->d_size = dsz; - if (db == sb && encoding == LIBELF_PRIVATE(byteorder) && - fsz == msz) + if (src->d_size == 0 || + (db == sb && encoding == LIBELF_PRIVATE(byteorder) && fsz == msz)) return (dst); /* nothing more to do */ (_libelf_get_translator(src->d_type, direction, elfclass))(dst->d_buf,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712150249.lBF2nrjD097475>