Mercurial > hg > xemacs-beta
comparison dynodump/ppc/_relocate.c @ 272:c5d627a313b1 r21-0b34
Import from CVS: tag r21-0b34
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:28:48 +0200 |
parents | 25f70ba0133c |
children |
comparison
equal
deleted
inserted
replaced
271:c7b7086b0a39 | 272:c5d627a313b1 |
---|---|
16 * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED | 16 * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED |
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN | 17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN |
18 * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT, | 18 * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT, |
19 * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING | 19 * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING |
20 * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY. | 20 * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY. |
21 * | 21 * |
22 * This source code is provided with no support and without any obligation on | 22 * This source code is provided with no support and without any obligation on |
23 * the part of Sun Microsystems, Inc. to assist in its use, correction, | 23 * the part of Sun Microsystems, Inc. to assist in its use, correction, |
24 * modification or enhancement. | 24 * modification or enhancement. |
25 * | 25 * |
26 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE | 26 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE |
27 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS | 27 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS |
28 * SOURCE CODE OR ANY PART THEREOF. | 28 * SOURCE CODE OR ANY PART THEREOF. |
30 * Sun Microsystems, Inc. | 30 * Sun Microsystems, Inc. |
31 * 2550 Garcia Avenue | 31 * 2550 Garcia Avenue |
32 * Mountain View, California 94043 | 32 * Mountain View, California 94043 |
33 */ | 33 */ |
34 | 34 |
35 #pragma ident "@(#) $Id: _relocate.c,v 1.3 1997/05/29 04:23:20 steve Exp $ - SMI" | 35 #pragma ident "@(#) $Id: _relocate.c,v 1.4 1998/03/31 20:10:55 steve Exp $ - SMI" |
36 | 36 |
37 /* LINTLIBRARY */ | 37 /* LINTLIBRARY */ |
38 | 38 |
39 #include <string.h> | 39 #include <string.h> |
40 #include <sys/elf_ppc.h> | 40 #include <sys/elf_ppc.h> |
254 unsigned char *iaddr, *oaddr; | 254 unsigned char *iaddr, *oaddr; |
255 Addr off; | 255 Addr off; |
256 | 256 |
257 /* | 257 /* |
258 * If we are required to restore the relocation location | 258 * If we are required to restore the relocation location |
259 * to it's value prior to relocation, then read the | 259 * to its value prior to relocation, then read the |
260 * locations original contents from the input image and | 260 * locations original contents from the input image and |
261 * copy it to the output image. | 261 * copy it to the output image. |
262 */ | 262 */ |
263 off = rels->r_offset - ircache->c_shdr->sh_addr; | 263 off = rels->r_offset - ircache->c_shdr->sh_addr; |
264 iaddr = (unsigned char *)ircache->c_data->d_buf + off; | 264 iaddr = (unsigned char *)ircache->c_data->d_buf + off; |