/[gcl]/gcl/unixport/rsym_elf.c
ViewVC logotype

Diff of /gcl/unixport/rsym_elf.c

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

revision 1.2 by wfs, Sat May 13 23:40:14 2000 UTC revision 1.2.2.1 by camm, Fri Jan 4 21:25:25 2002 UTC
# Line 30  to compile use cc rsym.c -o rsym  -I../h Line 30  to compile use cc rsym.c -o rsym  -I../h
30  Elf32_Phdr pheader;  Elf32_Phdr pheader;
31  Elf32_Ehdr eheader;  Elf32_Ehdr eheader;
32  Elf32_Sym *symbol_table;  Elf32_Sym *symbol_table;
33  int text_index,data_index,bss_index;  int text_index,data_index,bss_index,sbss_index;
34  #undef SYM_NAME  #undef SYM_NAME
35  #undef EXT_and_TEXT_BSS_DAT  #undef EXT_and_TEXT_BSS_DAT
36    
# Line 175  char *filename; Line 175  char *filename;
175          my_string_table = get_section(fp,".strtab");          my_string_table = get_section(fp,".strtab");
176          text_index = get_section_number(".text");          text_index = get_section_number(".text");
177          bss_index = get_section_number(".bss");          bss_index = get_section_number(".bss");
178            sbss_index = get_section_number(".sbss");
179          data_index = get_section_number(".data");          data_index = get_section_number(".data");
180                    
181          fclose(fp);          fclose(fp);
# Line 189  struct lsymbol_table tab; Line 190  struct lsymbol_table tab;
190                                   (p->st_shndx == text_index \                                   (p->st_shndx == text_index \
191                                    || p->st_shndx == data_index\                                    || p->st_shndx == data_index\
192                                    || p->st_shndx == bss_index \                                    || p->st_shndx == bss_index \
193                                      || p->st_shndx == sbss_index \
194                                    || p->st_shndx == SHN_UNDEF \                                    || p->st_shndx == SHN_UNDEF \
195                                    ))                                    ))
196  #define SYM_NAME(p) my_string_table+(p->st_name)  #define SYM_NAME(p) my_string_table+(p->st_name)
# Line 224  char *out; Line 226  char *out;
226                 files to be loaded do NOT have this tacked on.                 files to be loaded do NOT have this tacked on.
227               */               */
228       if (name ) {       if (name ) {
229          char *tmp;         char *tmp;
230         tmp=index(name,'@') ;         tmp=index(name,'@') ;
231         if (name         if (name
232             && tmp             && tmp
233             && tmp[1]=='@'             && tmp[1]=='@'
234             && tmp[2]=='G'             && tmp[2]=='G'
235             && tmp[3]=='L'             && tmp[3]=='L'
236             && tmp[4]=='I')             && tmp[4]=='I') {
237           { *tmp=0; }           *tmp=0;      
238    
239             /* Some glibc have _setjmp as a strong symbol.  We will need
240                __sigsetjmp, to which _setjmp apparently points, to run
241                properly */
242    
243             if (!(strcmp(name,"_setjmp")))
244               name="__sigsetjmp";
245    
246           }
247       }       }
248    
249         { dprintf(tab.n_symbols %d , tab.n_symbols);         { dprintf(tab.n_symbols %d , tab.n_symbols);

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

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