Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.68
 
1.69
 
MAIN:ragge:20080101171757
 
local.c
_>6868         struct symtab *sp = IALLOC(sizeof(struct symtab));
 6969         size_t len = strlen(s) + strlen(s2) + 1;
 7070         
<>71 -        sp->sname = IALLOC(len);
 72 -        strlcpy(sp->sname, s, len);
 73 -        strlcat(sp->sname, s2, len);
  71+        sp->sname = sp->soname = IALLOC(len);
  72+        strlcpy(sp->soname, s, len);
  73+        strlcat(sp->soname, s2, len);
7474         sp->sclass = EXTERN;
 7575         sp->sflags = sp->slevel = 0;
 7676         return sp;
     
 !
8787         struct symtab *sp;
 8888 
 8989         q = tempnode(gotnr, PTR|VOID, 0, MKSUE(VOID));
<>90 -        sp = picsymtab(gcc_findname(p->n_sp), "@GOT");
  90+        sp = picsymtab(p->n_sp->soname, "@GOT");
9191         r = xbcon(0, sp, INT);
 9292         q = buildtree(PLUS, q, r);
 9393         q = block(UMUL, q, 0, PTR|VOID, 0, MKSUE(VOID));
     
 !
112112                 snprintf(buf, 32, LABFMT, (int)p->n_sp->soffset);
 113113                 sp = picsymtab(buf, "@GOTOFF");
 114114         } else
<>115 -                sp = picsymtab(gcc_findname(p->n_sp), "@GOTOFF");
  115+                sp = picsymtab(p->n_sp->soname, "@GOTOFF");
116116         sp->sclass = STATIC;
 117117         sp->stype = p->n_sp->stype;
 118118         r = xbcon(0, sp, INT);
     
 !
477477                     sp->sclass != EXTDEF)
 478478                         cerror("fixnames");
 479479 
<>480 -                if ((c = strstr(sp->sname, "@GOT")) == NULL)
  480+                if ((c = strstr(sp->soname, "@GOT")) == NULL)
481481                         cerror("fixnames2");
 482482                 if (isu) {
 483483                         memcpy(c, "@PLT", sizeof("@PLT"));
     
 !
711711                         p = p->n_left;
 712712                 p = p->n_right;
 713713                 q = p->n_sp;
<>714 -                if ((c = strstr(q->sname, "@GOT")) != NULL)
  714+                if ((c = strstr(q->soname, "@GOT")) != NULL)
715715                         *c = 0; /* ignore GOT ref here */
 716716         }
 717717         if (p->n_op != ICON && p->n_op != FCON)
     
 !
738738                             q->sclass == ILABEL) {
 739739                                 printf("+" LABFMT, q->soffset);
 740740                         } else
<>741 -                                printf("+%s", exname(q->sname));
  741+                                printf("+%s", exname(q->soname));
742742                 }
 743743                 printf("\n");
 744744                 break;
     
 !
817817 
 818818         off = tsize(q->stype, q->sdf, q->ssue);
 819819         off = (off+(SZCHAR-1))/SZCHAR;
<>820 -#ifdef GCC_COMPAT
 821 -        printf("        .comm %s,0%o\n", gcc_findname(q), off);
 822 -#else
 823 -        printf("        .comm %s,0%o\n", exname(q->sname), off);
 824 -#endif
  820+        printf("        .comm %s,0%o\n", exname(q->soname), off);
825821 }
 826822 
 827823 /* make a local common declaration for id, if reasonable */
     
 !
833829         off = tsize(q->stype, q->sdf, q->ssue);
 834830         off = (off+(SZCHAR-1))/SZCHAR;
 835831         if (q->slevel == 0)
<>836 -#ifdef GCC_COMPAT
 837 -                printf("        .lcomm %s,0%o\n", gcc_findname(q), off);
 838 -#else
 839 -                printf("        .lcomm %s,0%o\n", exname(q->sname), off);
 840 -#endif
  832+                printf("        .lcomm %s,0%o\n", exname(q->soname), off);
841833         else
 842834                 printf("        .lcomm " LABFMT ",0%o\n", q->soffset, off);
 843835 }
     
 !
856848 void
 857849 setloc1(int locc)
 858850 {
<> 851+        if (lastloc == -3) {
  852+                /* Ignore first printout after #pragma section */
  853+                lastloc = -2;
  854+                return;
  855+        }
859856         if (locc == lastloc)
 860857                 return;
 861858         lastloc = locc;
 862859         printf("        .%s\n", loctbl[locc]);
 863860 }
<_ 861+
  862+static char *nextsect;
  863+
  864+#define SSECTION        010000
  865+
  866+/*
  867+ * Give target the opportunity of handling pragmas.
  868+ */
  869+int
  870+mypragma(char **ary)
  871+{
  872+        if (strcmp(ary[1], "section") || ary[2] == NULL)
  873+                return 0;
  874+        nextsect = newstring(ary[2], strlen(ary[2]));
  875+        return 1;
  876+}
  877+
  878+/*
  879+ * Called when a identifier has been declared.
  880+ */
  881+void
  882+fixdef(struct symtab *sp)
  883+{
  884+        if (nextsect == NULL)
  885+                return;
  886+}
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-09-22 08:14 +0200