comparison src/unexalpha.c @ 282:c42ec1d1cded r21-0b39

Import from CVS: tag r21-0b39
author cvs
date Mon, 13 Aug 2007 10:33:18 +0200
parents 850242ba4a81
children e11d67e05968
comparison
equal deleted inserted replaced
281:090b52736db2 282:c42ec1d1cded
300 300
301 /* 301 /*
302 * Construct new symbol table header 302 * Construct new symbol table header
303 */ 303 */
304 304
305 bcopy (oldptr + nhdr.fhdr.f_symptr, buffer, cbHDRR); 305 memcpy (oldptr + nhdr.fhdr.f_symptr, buffer, cbHDRR);
306 306
307 #define symhdr ((pHDRR)buffer) 307 #define symhdr ((pHDRR)buffer)
308 newsyms = nhdr.aout.tsize + nhdr.aout.dsize; 308 newsyms = nhdr.aout.tsize + nhdr.aout.dsize;
309 symrel = newsyms - nhdr.fhdr.f_symptr; 309 symrel = newsyms - nhdr.fhdr.f_symptr;
310 nhdr.fhdr.f_symptr = newsyms; 310 nhdr.fhdr.f_symptr = newsyms;
392 s = old + stroff + x->asym.iss; /* name of the symbol */ 392 s = old + stroff + x->asym.iss; /* name of the symbol */
393 393
394 if (!strcmp(s,"_edata")) 394 if (!strcmp(s,"_edata"))
395 { 395 {
396 found++; 396 found++;
397 bcopy (x, &n_edata, cbEXTR); 397 memcpy (x, &n_edata, cbEXTR);
398 n_edata.asym.value = Brk; 398 n_edata.asym.value = Brk;
399 SEEK (new, newsyms + cbHDRR + i, 399 SEEK (new, newsyms + cbHDRR + i,
400 "seeking to symbol _edata in %s", new_name); 400 "seeking to symbol _edata in %s", new_name);
401 WRITE (new, &n_edata, cbEXTR, 401 WRITE (new, &n_edata, cbEXTR,
402 "writing symbol table entry for _edata into %s", new_name); 402 "writing symbol table entry for _edata into %s", new_name);
403 } 403 }
404 else if (!strcmp(s,"_end")) 404 else if (!strcmp(s,"_end"))
405 { 405 {
406 found++; 406 found++;
407 bcopy (x, &n_end, cbEXTR); 407 memcpy (x, &n_end, cbEXTR);
408 n_end.asym.value = Brk; 408 n_end.asym.value = Brk;
409 SEEK (new, newsyms + cbHDRR + i, 409 SEEK (new, newsyms + cbHDRR + i,
410 "seeking to symbol _end in %s", new_name); 410 "seeking to symbol _end in %s", new_name);
411 WRITE (new, &n_end, cbEXTR, 411 WRITE (new, &n_end, cbEXTR,
412 "writing symbol table entry for _end into %s", new_name); 412 "writing symbol table entry for _end into %s", new_name);