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

Diff of /gcl/o/sfasli.c

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

revision 1.10 by camm, Sat Mar 1 22:37:37 2003 UTC revision 1.11 by camm, Fri Aug 8 20:04:40 2003 UTC
# Line 53  build_symbol_table_bfd(void) { Line 53  build_symbol_table_bfd(void) {
53    if ((v=bfd_canonicalize_symtab(bself,q))<0)    if ((v=bfd_canonicalize_symtab(bself,q))<0)
54      FEerror("Cannot canonicalize self's symtab",0);      FEerror("Cannot canonicalize self's symtab",0);
55    for (u=0;u<v;u++) {    for (u=0;u<v;u++) {
56      char *c;      char *c=NULL;
57        struct bfd_link_hash_entry *h;
58    
59        if (!*q[u]->name)
60          continue;
61    
62      if ((c=(char *)strstr(q[u]->name,"@@"))) {      if ((c=(char *)strstr(q[u]->name,"@@"))) {
       struct bfd_link_hash_entry *h;  
63        *c=0;        *c=0;
64        if (!(h=bfd_link_hash_lookup(link_info.hash,q[u]->name,MY_BFD_TRUE,MY_BFD_TRUE,MY_BFD_TRUE)))        if (!(h=bfd_link_hash_lookup(link_info.hash,q[u]->name,MY_BFD_TRUE,MY_BFD_TRUE,MY_BFD_TRUE)))
65          FEerror("Cannot make new hash entry",0);          FEerror("Cannot make new hash entry",0);
66        h->type=bfd_link_hash_defined;        h->type=bfd_link_hash_new;
67        if (!q[u]->section)      } else if
68          FEerror("Symbol is missing section",0);        (!(h=bfd_link_hash_lookup(link_info.hash,q[u]->name,MY_BFD_FALSE,MY_BFD_FALSE,MY_BFD_TRUE)) &&
69        h->u.def.value=q[u]->value+q[u]->section->vma;         !(h=bfd_link_hash_lookup(link_info.hash,q[u]->name,MY_BFD_TRUE,MY_BFD_TRUE,MY_BFD_TRUE)))
       h->u.def.section=q[u]->section;  
       *c='@';  
     }  
     if (!strncmp(q[u]->name,"__",2) && !strcmp("i3",q[u]->name+strlen(q[u]->name)-2)) {  
       struct bfd_link_hash_entry *h;  
       if (!(h=bfd_link_hash_lookup(link_info.hash,q[u]->name,MY_BFD_TRUE,MY_BFD_TRUE,MY_BFD_TRUE)))  
70          FEerror("Cannot make new hash entry",0);          FEerror("Cannot make new hash entry",0);
71    
72        if (h->type!=bfd_link_hash_defined) {
73        h->type=bfd_link_hash_defined;        h->type=bfd_link_hash_defined;
74        if (!q[u]->section)        if (!q[u]->section)
75          FEerror("Symbol is missing section",0);          FEerror("Symbol ~S is missing section",1,make_simple_string(q[u]->name));
76        h->u.def.value=q[u]->value+q[u]->section->vma;        h->u.def.value=q[u]->value+q[u]->section->vma;
77        h->u.def.section=q[u]->section;        h->u.def.section=q[u]->section;
78      }      }
79    
80        if (c) {
81          *c='@';
82          c=NULL;
83        }
84    }    }
85    
86  #ifndef HAVE_ALLOCA  #ifndef HAVE_ALLOCA
87    free(q);    free(q);
88  #endif  #endif

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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