/[gcl]/gcl/o/rel_pecoff.c
ViewVC logotype

Diff of /gcl/o/rel_pecoff.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mjthomas, Sun Aug 29 02:46:03 2004 UTC revision 1.3 by mjthomas, Sat Sep 18 01:58:09 2004 UTC
# Line 9  relocate() Line 9  relocate()
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        
# Line 25  relocate() Line 19  relocate()
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:
# Line 38  relocate() Line 29  relocate()
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:

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26