9 |
char *where; |
char *where; |
10 |
describe_sym ( relocation_info.r_symndx, 0 ); |
describe_sym ( relocation_info.r_symndx, 0 ); |
11 |
where = the_start + relocation_info.r_vaddr; |
where = the_start + relocation_info.r_vaddr; |
|
#ifdef DEBUG |
|
|
fprintf ( stderr, "relocate: where: %9x at %9x -> " , *where, (unsigned int) where ); |
|
|
#endif |
|
12 |
if ( relocation_info.r_type == R_ABS ) { |
if ( relocation_info.r_type == R_ABS ) { |
|
#ifdef DEBUG |
|
|
fprintf( stderr, "R_ABS return %9x\n", relocation_info.r_type ); |
|
|
#endif |
|
13 |
return; |
return; |
14 |
} |
} |
15 |
|
|
19 |
case R_DIR32: |
case R_DIR32: |
20 |
*(int *)where = *((int *)where) + |
*(int *)where = *((int *)where) + |
21 |
symbol_table[relocation_info.r_symndx].n_value; |
symbol_table[relocation_info.r_symndx].n_value; |
|
#ifdef DEBUG |
|
|
fprintf ( stderr, "new val R_DIR32 %9x\n", *(int *)where); |
|
|
#endif |
|
22 |
break; |
break; |
23 |
|
|
24 |
case R_PCRLONG: |
case R_PCRLONG: |
29 |
*(int *)where = symbol_table[relocation_info.r_symndx].n_value |
*(int *)where = symbol_table[relocation_info.r_symndx].n_value |
30 |
- (int) where - sizeof(int *); |
- (int) where - sizeof(int *); |
31 |
|
|
|
/* |
|
|
*(int *)where = *((int *)where) - (int)start_address |
|
|
+ symbol_table[relocation_info.r_symndx].n_value; |
|
|
*/ |
|
|
|
|
|
#ifdef DEBUG |
|
|
fprintf ( stderr, "new val R_PCRLONG %9x\n", *(int *)where ); |
|
|
#endif |
|
|
|
|
32 |
break; |
break; |
33 |
|
|
34 |
default: |
default: |