Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.95
 
1.96
 
MAIN:ragge:20090208160126
 
local.c
_>118118 
 119119         NODE *q, *r;
 120120         struct symtab *sp;
<> 121+        char *name;
121122 
 122123         q = tempnode(gotnr, PTR|VOID, 0, MKSUE(VOID));
<>123 -        sp = picsymtab("", p->n_sp->soname, "@GOT");
  124+        if ((name = p->n_sp->soname) == NULL)
  125+                name = p->n_sp->sname;
  126+        sp = picsymtab("", name, "@GOT");
124127         r = xbcon(0, sp, INT);
 125128         q = buildtree(PLUS, q, r);
 126129         q = block(UMUL, q, 0, PTR|VOID, 0, MKSUE(VOID));
     
 !
133136 
 134137         NODE *q, *r;
 135138         struct symtab *sp;
<>136 -        char buf2[64];
  139+        char buf2[64], *name, *pspn;
137140 
<> 141+        if ((name = cftnsp->soname) == NULL)
  142+                name = cftnsp->sname;
  143+        if ((pspn = p->n_sp->soname) == NULL)
  144+                pspn = p->n_sp->sname;
138145         if (p->n_sp->sclass == EXTDEF) {
<>139 -                snprintf(buf2, 64, "-L%s$pb", cftnsp->soname);
 140 -                sp = picsymtab("", exname(p->n_sp->soname), buf2);
  146+                snprintf(buf2, 64, "-L%s$pb", name);
  147+                sp = picsymtab("", exname(pspn), buf2);
141148         } else {
<>142 -                snprintf(buf2, 64, "$non_lazy_ptr-L%s$pb", cftnsp->soname);
 143 -                sp = picsymtab("L", p->n_sp->soname, buf2);
 144 -                addstub(&nlplist, p->n_sp->soname);
  149+                snprintf(buf2, 64, "$non_lazy_ptr-L%s$pb", name);
  150+                sp = picsymtab("L", pspn, buf2);
  151+                addstub(&nlplist, pspn);
145152         }
 146153         q = tempnode(gotnr, PTR+VOID, 0, MKSUE(VOID));
 147154         r = xbcon(0, sp, INT);
     
 !
179186                 char buf[32];
 180187                 snprintf(buf, 32, LABFMT, (int)p->n_sp->soffset);
 181188                 sp = picsymtab("", buf, "@GOTOFF");
<>182 -        } else
 183 -                sp = picsymtab("", p->n_sp->soname, "@GOTOFF");
  189+        } else {
  190+                char *name;
  191+                if ((name = p->n_sp->soname) == NULL)
  192+                        name = p->n_sp->sname;
  193+                sp = picsymtab("", name, "@GOTOFF");
  194+        }
  195+        
184196         sp->sclass = STATIC;
 185197         sp->stype = p->n_sp->stype;
 186198         r = xbcon(0, sp, INT);
     
 !
204216                 sp = picsymtab("", buf1, buf2);
 205217                 sp->sflags |= SNOUNDERSCORE;
 206218         } else  {
<>207 -                sp = picsymtab("", exname(p->n_sp->soname), buf2);
  219+                char *name;
  220+                if ((name = p->n_sp->soname) == NULL)
  221+                        name = p->n_sp->sname;
  222+                sp = picsymtab("", exname(name), buf2);
208223         }
 209224         sp->sclass = STATIC;
 210225         sp->stype = p->n_sp->stype;
     
 !
233248 {
 234249         NODE *q, *r;
 235250         struct symtab *sp, *sp2;
<> 251+        char *name;
236252 
 237253         /*
 238254          * creates:
     
 !
242258 
 243259         /* calc address of var@TLSGD */
 244260         q = tempnode(gotnr, PTR|VOID, 0, MKSUE(VOID));
<>245 -        sp = picsymtab("", p->n_sp->soname, "@TLSGD");
  261+        if ((name = p->n_sp->soname) == NULL)
  262+                name = p->n_sp->sname;
  263+        sp = picsymtab("", name, "@TLSGD");
246264         r = xbcon(0, sp, INT);
 247265         q = buildtree(PLUS, q, r);
 248266 
     
 !
273291         NODE *q, *r;
 274292         struct symtab *sp, *sp2;
 275293         int ext = p->n_sp->sclass;
<> 294+        char *name;
276295 
<>277 -        sp = picsymtab("", p->n_sp->soname,
  296+        if ((name = p->n_sp->soname) == NULL)
  297+                name = p->n_sp->sname;
  298+        sp = picsymtab("", name,
278299             ext == EXTERN ? "@INDNTPOFF" : "@NTPOFF");
 279300         q = xbcon(0, sp, INT);
 280301         if (ext == EXTERN)
     
 !
687708                 if (sp->sclass != STATIC && sp->sclass != EXTERN &&
 688709                     sp->sclass != EXTDEF)
 689710                         cerror("fixnames");
<>690 -
  711+                c = NULL;
691712 #if defined(ELFABI)
 692713 
<>693 -                if ((c = strstr(sp->soname, "@GOT")) == NULL)
  714+                if (sp->soname == NULL ||
  715+                    (c = strstr(sp->soname, "@GOT")) == NULL)
694716                         cerror("fixnames2");
 695717                 if (isu) {
 696718                         memcpy(c, "@PLT", sizeof("@PLT"));
     
 !
699721 
 700722 #elif defined(MACHOABI)
 701723 
<>702 -                if ((c = strstr(sp->soname, "$non_lazy_ptr")) == NULL &&
 703 -                    (c = strstr(sp->soname, "-L")) == NULL)
  724+                if (sp->soname == NULL ||
  725+                    ((c = strstr(sp->soname, "$non_lazy_ptr")) == NULL &&
  726+                    (c = strstr(sp->soname, "-L")) == NULL))
704727                                 cerror("fixnames2");
 705728                 if (isu) {
 706729                         *c = 0;
     
 !
9871010                 p = p->n_right;
 9881011                 q = p->n_sp;
 9891012 
<> 1013+                if (q->soname != NULL) {
9901014 #if defined(ELFABI)
 9911015 
<>992 -                if ((c = strstr(q->soname, "@GOT")) != NULL)
 993 -                        *c = 0; /* ignore GOT ref here */
 994 -
  1016+                        if ((c = strstr(q->soname, "@GOT")) != NULL)
  1017+                                *c = 0; /* ignore GOT ref here */
9951018 #elif defined(MACHOABI)
 9961019 
<>997 -                if  ((c = strstr(q->soname, "$non_lazy_ptr")) != NULL) {
 998 -                        q->soname++;    /* skip "L" */
 999 -                        *c = 0; /* ignore GOT ref here */
 1000 -                }
 1001 -                else if ((c = strstr(q->soname, "-L")) != NULL)
 1002 -                        *c = 0; /* ignore GOT ref here */
 1003 -
  1020+                        if  ((c = strstr(q->soname, "$non_lazy_ptr")) != NULL) {
  1021+                                q->soname++;    /* skip "L" */
  1022+                                *c = 0; /* ignore GOT ref here */
  1023+                        } else if ((c = strstr(q->soname, "-L")) != NULL)
  1024+                                *c = 0; /* ignore GOT ref here */
10041025 #endif
<> 1026+                }
10051027         }
 10061028         if (p->n_op != ICON && p->n_op != FCON)
 10071029                 cerror("ninval: init node not constant");
     
 !
10261048                         if ((q->sclass == STATIC && q->slevel > 0)) {
 10271049                                 printf("+" LABFMT, q->soffset);
 10281050                         } else {
<> 1051+                                char *name;
  1052+                                if ((name = q->soname) == NULL)
  1053+                                        name = q->sname;
10291054 #if defined(MACHOABI)
 10301055                                 if ((q->sflags & SNOUNDERSCORE) != 0)
<>1031 -                                        printf("+%s", q->soname);
  1056+                                        printf("+%s", name);
10321057                                 else
 10331058 #endif
<>1034 -                                        printf("+%s", exname(q->soname));
  1059+                                        printf("+%s", exname(name));
10351060                         }
 10361061                 }
 10371062                 printf("\n");
     
 !
11571182         off = (off+(SZCHAR-1))/SZCHAR;
 11581183         printf("        .%scomm ", sp->sclass == STATIC ? "l" : "");
 11591184         if (sp->slevel == 0)
<>1160 -                printf("%s,0%o", exname(sp->soname), off);
  1185+                printf("%s,0%o",
  1186+                    sp->soname ? sp->soname : exname(sp->sname), off);
11611187         else
 11621188                 printf(LABFMT ",0%o", sp->soffset, off);
 11631189         if (sp->sclass != STATIC)
     
 !
12661292         gottls = 0;
 12671293 #endif
 12681294         if (alias != NULL && (sp->sclass != PARAM)) {
<>1269 -                printf("\t.globl %s\n", exname(sp->soname));
 1270 -                printf("%s = ", exname(sp->soname));
  1295+                char *name;
  1296+                if ((name = sp->soname) == NULL)
  1297+                        name = exname(sp->sname);
  1298+                printf("\t.globl %s\n", name);
  1299+                printf("%s = ", name);
<_12711300                 printf("%s\n", exname(alias));
 12721301                 alias = NULL;
 12731302         }
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-11-01 08:45 +0100