kldxref.c (95258) | kldxref.c (109607) |
---|---|
1/* 2 * Copyright (c) 2000, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 2000, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/usr.sbin/kldxref/kldxref.c 95258 2002-04-22 13:44:47Z des $ | 32 * $FreeBSD: head/usr.sbin/kldxref/kldxref.c 109607 2003-01-21 03:51:53Z jake $ |
33 */ 34 35#include <sys/param.h> 36#include <sys/exec.h> 37#include <sys/queue.h> 38#include <sys/kernel.h> 39#include <sys/reboot.h> 40#include <sys/linker.h> --- 183 unchanged lines hidden (view full) --- 224/* fprintf(fxref, "%s:%s:%d\n", kldmodname, kldname, 0);*/ 225 } 226 do { 227 check(ef_lookup_symbol(&ef, "__start_set_" MDT_SETNAME, &sym)); 228 start = sym->st_value; 229 check(ef_lookup_symbol(&ef, "__stop_set_" MDT_SETNAME, &sym)); 230 finish = sym->st_value; 231 entries = (finish - start) / sizeof(void *); | 33 */ 34 35#include <sys/param.h> 36#include <sys/exec.h> 37#include <sys/queue.h> 38#include <sys/kernel.h> 39#include <sys/reboot.h> 40#include <sys/linker.h> --- 183 unchanged lines hidden (view full) --- 224/* fprintf(fxref, "%s:%s:%d\n", kldmodname, kldname, 0);*/ 225 } 226 do { 227 check(ef_lookup_symbol(&ef, "__start_set_" MDT_SETNAME, &sym)); 228 start = sym->st_value; 229 check(ef_lookup_symbol(&ef, "__stop_set_" MDT_SETNAME, &sym)); 230 finish = sym->st_value; 231 entries = (finish - start) / sizeof(void *); |
232 check(ef_seg_read_entry(&ef, start, sizeof(*p) * entries, (void**)&p)); | 232 check(ef_seg_read_entry_rel(&ef, start, sizeof(*p) * entries, 233 (void**)&p)); |
233 orgp = p; 234 while(entries--) { | 234 orgp = p; 235 while(entries--) { |
235 check(ef_seg_read(&ef, (Elf_Off)*p, sizeof(md), &md)); | 236 check(ef_seg_read_rel(&ef, (Elf_Off)*p, sizeof(md), &md)); |
236 p++; 237 check(ef_seg_read(&ef, (Elf_Off)md.md_cval, sizeof(cval), cval)); 238 cval[MAXMODNAME] = '\0'; 239 parse_entry(&md, cval, &ef, kldname); 240 } 241 if (error) 242 warnc(error, "error while reading %s", filename); 243 free(orgp); --- 103 unchanged lines hidden --- | 237 p++; 238 check(ef_seg_read(&ef, (Elf_Off)md.md_cval, sizeof(cval), cval)); 239 cval[MAXMODNAME] = '\0'; 240 parse_entry(&md, cval, &ef, kldname); 241 } 242 if (error) 243 warnc(error, "error while reading %s", filename); 244 free(orgp); --- 103 unchanged lines hidden --- |