tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Valgrind Inconsistency detected by ld.so: rtld.c:


From: Domingo Alvarez Duarte
Subject: Re: [Tinycc-devel] Valgrind Inconsistency detected by ld.so: rtld.c:
Date: Fri, 28 Mar 2014 12:27:39 +0000

For arm experts, it gets a segfault on translate.c:98
----
/*
** Translate the input stream into the output stream
*/
static void trans(FILE *in, FILE *out){
  int i, j, k;          /* Loop counters */
  char c1, c2;          /* Characters used to start a comment */
  int lastWasEq = 0;    /* True if last non-whitespace character was "=" */
  int lastWasComma = 0; /* True if last non-whitespace character was "," */
  char zLine[2000];     /* A single line of input */
  char zOut[4000];      /* The input line translated into appropriate output */

  c1 = c2 = '-';
  while( fgets(zLine, sizeof(zLine), in) ){  ///<<<<<<<<<<<<<<<<<<<<<<<<<<< here segfault after some runs
    for(i=0; zLine[i] && isspace(zLine[i]); i++){}
    if( zLine[i]!='@' ){
      if( inPrint || inStr ) end_block(out);
      fprintf(out,"%s",zLine);
                       /* 0123456789 12345 */
      if( strncmp(zLine, "/* @-comment: ", 14)==0 ){
        c1 = zLine[14];
        c2 = zLine[15];
      }
      i += strlen(&zLine[i]);
      while( i>0 && isspace(zLine[i-1]) ){ i--; }
      lastWasEq    = i>0 && zLine[i-1]=='=';
      lastWasComma = i>0 && zLine[i-1]==',';
    }else if( lastWasEq || lastWasComma){
      /* If the last non-whitespace character before the first @ was
      ** an "="(var init/set) or a ","(const definition in list) then
      ** generate a string literal.  But skip comments
      ** consisting of all text between c1 and c2 (default "--")
      ** and end of line.
      */
      int indent, omitline;
      i++;
      if( isspace(zLine[i]) ){ i++; }
      indent = i - 2;
      if( indent<0 ) indent = 0;
      omitline = 0;
      for(j=0; zLine[i] && zLine[i]!='\r' && zLine[i]!='\n'; i++){
        if( zLine[i]==c1 && (c2==' ' || zLine[i+1]==c2) ){
           omitline = 1; break; 
        }
        if( zLine[i]=='"' || zLine[i]=='\\' ){ zOut[j++] = '\\'; }
        zOut[j++] = zLine[i];
      }
      while( j>0 && isspace(zOut[j-1]) ){ j--; }
      zOut[j] = 0;
      if( j<=0 && omitline ){
        fprintf(out,"\n");
      }else{
        fprintf(out,"%*s\"%s\\n\"\n",indent, "", zOut);
      }
    }else{
      /* Otherwise (if the last non-whitespace was not '=') then generate
      ** a cgi_printf() statement whose format is the text following the '@'.
      ** Substrings of the form "%C(...)" (where C is any sequence of 
      ** characters other than \000 and '(') will put "%C" in the
      ** format and add the "(...)" as an argument to the cgi_printf call.
      */
      int indent;
      int nC;
      char c;
      i++;
      if( isspace(zLine[i]) ){ i++; }
      indent = i;
      for(j=0; zLine[i] && zLine[i]!='\r' && zLine[i]!='\n'; i++){
        if( zLine[i]=='"' || zLine[i]=='\\' ){ zOut[j++] = '\\'; }
        zOut[j++] = zLine[i];
        if( zLine[i]!='%' || zLine[i+1]=='%' || zLine[i+1]==0 ) continue;
        for(nC=1; zLine[i+nC] && zLine[i+nC]!='('; nC++){}
        if( zLine[i+nC]!='(' || !isalpha(zLine[i+nC-1]) ) continue;
        while( --nC ) zOut[j++] = zLine[++i];
        zArg[nArg++] = ',';
        k = 0; i++;
        while( (c = zLine[i])!=0 ){
          zArg[nArg++] = c;
          if( c==')' ){
            k--;
            if( k==0 ) break;
          }else if( c=='(' ){
            k++;
          }
          i++;
        }
      }
      zOut[j] = 0;
      if( !inPrint ){
        fprintf(out,"%*scgi_printf(\"%s\\n\"",indent-2,"", zOut);
        inPrint = 1;
      }else{
        fprintf(out,"\n%*s\"%s\\n\"",indent+5, "", zOut);
      }
    }      
  }
}
-----

Here is the disassembled function code done by objdump -Dslx

-----
00000424 <trans>:
trans():
/home/mingo/dev/fossil/./src/translate.c:89
     424: e1a0c00d mov ip, sp
     428: e92d0003 push {r0, r1}
     42c: e92d5800 push {fp, ip, lr}
     430: e1a0b00d mov fp, sp
     434: eb0002f4 bl 100c <__bswap_32+0xfc4>
     438: e3a00000 mov r0, #0
     43c: e50b0014 str r0, [fp, #-20]
     440: e3a00000 mov r0, #0
     444: e50b0018 str r0, [fp, #-24]
/home/mingo/dev/fossil/./src/translate.c:97
     448: e3a0002d mov r0, #45 ; 0x2d
     44c: e54b000e strb r0, [fp, #-14]
     450: e20000ff and r0, r0, #255 ; 0xff
     454: e20000ff and r0, r0, #255 ; 0xff
     458: e54b000d strb r0, [fp, #-13]
/home/mingo/dev/fossil/./src/translate.c:98
     45c: e59b200c ldr r2, [fp, #12]
     460: e3a01e7d mov r1, #2000 ; 0x7d0
     464: e59f0000 ldr r0, [pc] ; 46c <__bswap_32+0x424>
     468: ea000000 b 470 <__bswap_32+0x428>
     46c: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     470: e08b0000 add r0, fp, r0
     474: ebfffffe bl 0 <fgets>
474: R_ARM_PC24 fgets
     478: e3500000 cmp r0, #0
     47c: 0a0002e1 beq 1008 <__bswap_32+0xfc0>
/home/mingo/dev/fossil/./src/translate.c:99
     480: e3a00000 mov r0, #0
     484: e50b0004 str r0, [fp, #-4]
     488: e59f0000 ldr r0, [pc] ; 490 <__bswap_32+0x448>
     48c: ea000000 b 494 <__bswap_32+0x44c>
     490: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     494: e08b0000 add r0, fp, r0
     498: e51b1004 ldr r1, [fp, #-4]
     49c: e0800001 add r0, r0, r1
     4a0: e5d01000 ldrb r1, [r0]
     4a4: e3511000 cmp r1, #0
     4a8: 0a000015 beq 504 <__bswap_32+0x4bc>
     4ac: ebfffffe bl 0 <__ctype_b_loc>
4ac: R_ARM_PC24 __ctype_b_loc
     4b0: e59f1000 ldr r1, [pc] ; 4b8 <__bswap_32+0x470>
     4b4: ea000000 b 4bc <__bswap_32+0x474>
     4b8: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     4bc: e08b1001 add r1, fp, r1
     4c0: e51b2004 ldr r2, [fp, #-4]
     4c4: e0811002 add r1, r1, r2
     4c8: e5d12000 ldrb r2, [r1]
     4cc: e1a02082 lsl r2, r2, #1
     4d0: e5901000 ldr r1, [r0]
     4d4: e0811002 add r1, r1, r2
     4d8: e1d100b0 ldrh r0, [r1]
     4dc: e2000a02 and r0, r0, #8192 ; 0x2000
     4e0: e3500000 cmp r0, #0
     4e4: 0a000006 beq 504 <__bswap_32+0x4bc>
     4e8: ea000004 b 500 <__bswap_32+0x4b8>
     4ec: e51b0004 ldr r0, [fp, #-4]
     4f0: e1a01000 mov r1, r0
     4f4: e2800001 add r0, r0, #1
     4f8: e50b0004 str r0, [fp, #-4]
     4fc: eaffffe1 b 488 <__bswap_32+0x440>
     500: eafffff9 b 4ec <__bswap_32+0x4a4>
/home/mingo/dev/fossil/./src/translate.c:100
     504: e59f0000 ldr r0, [pc] ; 50c <__bswap_32+0x4c4>
     508: ea000000 b 510 <__bswap_32+0x4c8>
     50c: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     510: e08b0000 add r0, fp, r0
     514: e51b1004 ldr r1, [fp, #-4]
     518: e0800001 add r0, r0, r1
     51c: e5d01000 ldrb r1, [r0]
     520: e3511040 cmp r1, #64 ; 0x40
     524: 0a00006b beq 6d8 <__bswap_32+0x690>
/home/mingo/dev/fossil/./src/translate.c:101
     528: e59fe000 ldr lr, [pc] ; 530 <__bswap_32+0x4e8>
     52c: ea000000 b 534 <__bswap_32+0x4ec>
     530: 00000000 andeq r0, r0, r0
530: R_ARM_ABS32 inPrint
     534: e59e0000 ldr r0, [lr]
     538: e3500000 cmp r0, #0
     53c: 1a000006 bne 55c <__bswap_32+0x514>
     540: e59fe000 ldr lr, [pc] ; 548 <__bswap_32+0x500>
     544: ea000000 b 54c <__bswap_32+0x504>
     548: 00000000 andeq r0, r0, r0
548: R_ARM_ABS32 inStr
     54c: e59e0000 ldr r0, [lr]
     550: e3500000 cmp r0, #0
     554: 1a000000 bne 55c <__bswap_32+0x514>
     558: ea000001 b 564 <__bswap_32+0x51c>
     55c: e59b0010 ldr r0, [fp, #16]
     560: ebfffffe bl 384 <__bswap_32+0x33c>
560: R_ARM_PC24 end_block
/home/mingo/dev/fossil/./src/translate.c:102
     564: e59f2000 ldr r2, [pc] ; 56c <__bswap_32+0x524>
     568: ea000000 b 570 <__bswap_32+0x528>
     56c: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     570: e08b2002 add r2, fp, r2
     574: e59f1000 ldr r1, [pc] ; 57c <__bswap_32+0x534>
     578: ea000000 b 580 <__bswap_32+0x538>
     57c: 00000000 andeq r0, r0, r0
57c: R_ARM_ABS32 L.25
     580: e59b0010 ldr r0, [fp, #16]
     584: ebfffffe bl 0 <fprintf>
584: R_ARM_PC24 fprintf
/home/mingo/dev/fossil/./src/translate.c:104
     588: e3a0200e mov r2, #14
     58c: e59f1000 ldr r1, [pc] ; 594 <__bswap_32+0x54c>
     590: ea000000 b 598 <__bswap_32+0x550>
     594: 00000000 andeq r0, r0, r0
594: R_ARM_ABS32 L.26
     598: e59f0000 ldr r0, [pc] ; 5a0 <__bswap_32+0x558>
     59c: ea000000 b 5a4 <__bswap_32+0x55c>
     5a0: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     5a4: e08b0000 add r0, fp, r0
     5a8: ebfffffe bl 0 <strncmp>
5a8: R_ARM_PC24 strncmp
     5ac: e3500000 cmp r0, #0
     5b0: 1a000003 bne 5c4 <__bswap_32+0x57c>
/home/mingo/dev/fossil/./src/translate.c:105
     5b4: e55b07da ldrb r0, [fp, #-2010] ; 0x7da
     5b8: e54b000d strb r0, [fp, #-13]
/home/mingo/dev/fossil/./src/translate.c:106
     5bc: e55b07d9 ldrb r0, [fp, #-2009] ; 0x7d9
     5c0: e54b000e strb r0, [fp, #-14]
/home/mingo/dev/fossil/./src/translate.c:108
     5c4: e59f0000 ldr r0, [pc] ; 5cc <__bswap_32+0x584>
     5c8: ea000000 b 5d0 <__bswap_32+0x588>
     5cc: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     5d0: e08b0000 add r0, fp, r0
     5d4: e51b1004 ldr r1, [fp, #-4]
     5d8: e0800001 add r0, r0, r1
     5dc: ebfffffe bl 0 <strlen>
5dc: R_ARM_PC24 strlen
     5e0: e51b1004 ldr r1, [fp, #-4]
     5e4: e0810000 add r0, r1, r0
     5e8: e50b0004 str r0, [fp, #-4]
/home/mingo/dev/fossil/./src/translate.c:109
     5ec: e51b0004 ldr r0, [fp, #-4]
     5f0: e3500000 cmp r0, #0
     5f4: da000014 ble 64c <__bswap_32+0x604>
     5f8: ebfffffe bl 0 <__ctype_b_loc>
5f8: R_ARM_PC24 __ctype_b_loc
     5fc: e51b1004 ldr r1, [fp, #-4]
     600: e2411001 sub r1, r1, #1
     604: e59f2000 ldr r2, [pc] ; 60c <__bswap_32+0x5c4>
     608: ea000000 b 610 <__bswap_32+0x5c8>
     60c: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     610: e08b2002 add r2, fp, r2
     614: e0821001 add r1, r2, r1
     618: e5d12000 ldrb r2, [r1]
     61c: e1a02082 lsl r2, r2, #1
     620: e5901000 ldr r1, [r0]
     624: e0811002 add r1, r1, r2
     628: e1d100b0 ldrh r0, [r1]
     62c: e2000a02 and r0, r0, #8192 ; 0x2000
     630: e3500000 cmp r0, #0
     634: 0a000004 beq 64c <__bswap_32+0x604>
     638: e51b0004 ldr r0, [fp, #-4]
     63c: e1a01000 mov r1, r0
     640: e2400001 sub r0, r0, #1
     644: e50b0004 str r0, [fp, #-4]
     648: eaffffe7 b 5ec <__bswap_32+0x5a4>
/home/mingo/dev/fossil/./src/translate.c:110
     64c: e51b0004 ldr r0, [fp, #-4]
     650: e3500000 cmp r0, #0
     654: da00000b ble 688 <__bswap_32+0x640>
     658: e51b0004 ldr r0, [fp, #-4]
     65c: e2400001 sub r0, r0, #1
     660: e59f1000 ldr r1, [pc] ; 668 <__bswap_32+0x620>
     664: ea000000 b 66c <__bswap_32+0x624>
     668: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     66c: e08b1001 add r1, fp, r1
     670: e0810000 add r0, r1, r0
     674: e5d01000 ldrb r1, [r0]
     678: e351103d cmp r1, #61 ; 0x3d
     67c: 1a000001 bne 688 <__bswap_32+0x640>
     680: e3a00001 mov r0, #1
     684: ea000000 b 68c <__bswap_32+0x644>
     688: e3a00000 mov r0, #0
     68c: e50b0014 str r0, [fp, #-20]
/home/mingo/dev/fossil/./src/translate.c:111
     690: e51b0004 ldr r0, [fp, #-4]
     694: e3500000 cmp r0, #0
     698: da00000b ble 6cc <__bswap_32+0x684>
     69c: e51b0004 ldr r0, [fp, #-4]
     6a0: e2400001 sub r0, r0, #1
     6a4: e59f1000 ldr r1, [pc] ; 6ac <__bswap_32+0x664>
     6a8: ea000000 b 6b0 <__bswap_32+0x668>
     6ac: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     6b0: e08b1001 add r1, fp, r1
     6b4: e0810000 add r0, r1, r0
     6b8: e5d01000 ldrb r1, [r0]
     6bc: e351102c cmp r1, #44 ; 0x2c
     6c0: 1a000001 bne 6cc <__bswap_32+0x684>
     6c4: e3a00001 mov r0, #1
     6c8: ea000000 b 6d0 <__bswap_32+0x688>
     6cc: e3a00000 mov r0, #0
     6d0: e50b0018 str r0, [fp, #-24]
     6d4: ea00024a b 1004 <__bswap_32+0xfbc>
/home/mingo/dev/fossil/./src/translate.c:112
     6d8: e51b0014 ldr r0, [fp, #-20]
     6dc: e3500000 cmp r0, #0
     6e0: 1a000003 bne 6f4 <__bswap_32+0x6ac>
     6e4: e51b0018 ldr r0, [fp, #-24]
     6e8: e3500000 cmp r0, #0
     6ec: 1a000000 bne 6f4 <__bswap_32+0x6ac>
     6f0: ea0000d2 b a40 <__bswap_32+0x9f8>
/home/mingo/dev/fossil/./src/translate.c:120
     6f4: e51b0004 ldr r0, [fp, #-4]
     6f8: e1a01000 mov r1, r0
     6fc: e2800001 add r0, r0, #1
     700: e50b0004 str r0, [fp, #-4]
/home/mingo/dev/fossil/./src/translate.c:121
     704: ebfffffe bl 0 <__ctype_b_loc>
704: R_ARM_PC24 __ctype_b_loc
     708: e59f1000 ldr r1, [pc] ; 710 <__bswap_32+0x6c8>
     70c: ea000000 b 714 <__bswap_32+0x6cc>
     710: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     714: e08b1001 add r1, fp, r1
     718: e51b2004 ldr r2, [fp, #-4]
     71c: e0811002 add r1, r1, r2
     720: e5d12000 ldrb r2, [r1]
     724: e1a02082 lsl r2, r2, #1
     728: e5901000 ldr r1, [r0]
     72c: e0811002 add r1, r1, r2
     730: e1d100b0 ldrh r0, [r1]
     734: e2000a02 and r0, r0, #8192 ; 0x2000
     738: e3500000 cmp r0, #0
     73c: 0a000003 beq 750 <__bswap_32+0x708>
     740: e51b0004 ldr r0, [fp, #-4]
     744: e1a01000 mov r1, r0
     748: e2800001 add r0, r0, #1
     74c: e50b0004 str r0, [fp, #-4]
/home/mingo/dev/fossil/./src/translate.c:122
     750: e51b0004 ldr r0, [fp, #-4]
     754: e2400002 sub r0, r0, #2
     758: e24bea01 sub lr, fp, #4096 ; 0x1000
     75c: e50e078c str r0, [lr, #-1932] ; 0x78c
/home/mingo/dev/fossil/./src/translate.c:123
     760: e24bea01 sub lr, fp, #4096 ; 0x1000
     764: e51e078c ldr r0, [lr, #-1932] ; 0x78c
     768: e3500000 cmp r0, #0
     76c: aa000002 bge 77c <__bswap_32+0x734>
     770: e3a00000 mov r0, #0
     774: e24bea01 sub lr, fp, #4096 ; 0x1000
     778: e50e078c str r0, [lr, #-1932] ; 0x78c
/home/mingo/dev/fossil/./src/translate.c:124
     77c: e3a00000 mov r0, #0
     780: e24bea01 sub lr, fp, #4096 ; 0x1000
     784: e50e0790 str r0, [lr, #-1936] ; 0x790
/home/mingo/dev/fossil/./src/translate.c:125
     788: e3a00000 mov r0, #0
     78c: e50b0008 str r0, [fp, #-8]
     790: e59f0000 ldr r0, [pc] ; 798 <__bswap_32+0x750>
     794: ea000000 b 79c <__bswap_32+0x754>
     798: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     79c: e08b0000 add r0, fp, r0
     7a0: e51b1004 ldr r1, [fp, #-4]
     7a4: e0800001 add r0, r0, r1
     7a8: e5d01000 ldrb r1, [r0]
     7ac: e3511000 cmp r1, #0
     7b0: 0a000064 beq 948 <__bswap_32+0x900>
     7b4: e59f0000 ldr r0, [pc] ; 7bc <__bswap_32+0x774>
     7b8: ea000000 b 7c0 <__bswap_32+0x778>
     7bc: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     7c0: e08b0000 add r0, fp, r0
     7c4: e51b1004 ldr r1, [fp, #-4]
     7c8: e0800001 add r0, r0, r1
     7cc: e5d01000 ldrb r1, [r0]
     7d0: e351100d cmp r1, #13
     7d4: 0a00005b beq 948 <__bswap_32+0x900>
     7d8: e59f0000 ldr r0, [pc] ; 7e0 <__bswap_32+0x798>
     7dc: ea000000 b 7e4 <__bswap_32+0x79c>
     7e0: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     7e4: e08b0000 add r0, fp, r0
     7e8: e51b1004 ldr r1, [fp, #-4]
     7ec: e0800001 add r0, r0, r1
     7f0: e5d01000 ldrb r1, [r0]
     7f4: e351100a cmp r1, #10
     7f8: 0a000052 beq 948 <__bswap_32+0x900>
     7fc: ea000004 b 814 <__bswap_32+0x7cc>
     800: e51b0004 ldr r0, [fp, #-4]
     804: e1a01000 mov r1, r0
     808: e2800001 add r0, r0, #1
     80c: e50b0004 str r0, [fp, #-4]
     810: eaffffde b 790 <__bswap_32+0x748>
/home/mingo/dev/fossil/./src/translate.c:126
     814: e59f0000 ldr r0, [pc] ; 81c <__bswap_32+0x7d4>
     818: ea000000 b 820 <__bswap_32+0x7d8>
     81c: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     820: e08b0000 add r0, fp, r0
     824: e51b1004 ldr r1, [fp, #-4]
     828: e0800001 add r0, r0, r1
     82c: e5d01000 ldrb r1, [r0]
     830: e55b000d ldrb r0, [fp, #-13]
     834: e1510000 cmp r1, r0
     838: 1a000012 bne 888 <__bswap_32+0x840>
     83c: e55b000e ldrb r0, [fp, #-14]
     840: e3500020 cmp r0, #32
     844: 0a00000b beq 878 <__bswap_32+0x830>
     848: e51b0004 ldr r0, [fp, #-4]
     84c: e2800001 add r0, r0, #1
     850: e59f1000 ldr r1, [pc] ; 858 <__bswap_32+0x810>
     854: ea000000 b 85c <__bswap_32+0x814>
     858: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     85c: e08b1001 add r1, fp, r1
     860: e0810000 add r0, r1, r0
     864: e5d01000 ldrb r1, [r0]
     868: e55b000e ldrb r0, [fp, #-14]
     86c: e1510000 cmp r1, r0
     870: 0a000000 beq 878 <__bswap_32+0x830>
     874: ea000003 b 888 <__bswap_32+0x840>
/home/mingo/dev/fossil/./src/translate.c:127
     878: e3a00001 mov r0, #1
     87c: e24bea01 sub lr, fp, #4096 ; 0x1000
     880: e50e0790 str r0, [lr, #-1936] ; 0x790
     884: ea00002f b 948 <__bswap_32+0x900>
/home/mingo/dev/fossil/./src/translate.c:129
     888: e59f0000 ldr r0, [pc] ; 890 <__bswap_32+0x848>
     88c: ea000000 b 894 <__bswap_32+0x84c>
     890: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     894: e08b0000 add r0, fp, r0
     898: e51b1004 ldr r1, [fp, #-4]
     89c: e0800001 add r0, r0, r1
     8a0: e5d01000 ldrb r1, [r0]
     8a4: e3511022 cmp r1, #34 ; 0x22
     8a8: 0a000009 beq 8d4 <__bswap_32+0x88c>
     8ac: e59f0000 ldr r0, [pc] ; 8b4 <__bswap_32+0x86c>
     8b0: ea000000 b 8b8 <__bswap_32+0x870>
     8b4: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     8b8: e08b0000 add r0, fp, r0
     8bc: e51b1004 ldr r1, [fp, #-4]
     8c0: e0800001 add r0, r0, r1
     8c4: e5d01000 ldrb r1, [r0]
     8c8: e351105c cmp r1, #92 ; 0x5c
     8cc: 0a000000 beq 8d4 <__bswap_32+0x88c>
     8d0: ea00000a b 900 <__bswap_32+0x8b8>
     8d4: e51b0008 ldr r0, [fp, #-8]
     8d8: e1a01000 mov r1, r0
     8dc: e2800001 add r0, r0, #1
     8e0: e50b0008 str r0, [fp, #-8]
     8e4: e59f0000 ldr r0, [pc] ; 8ec <__bswap_32+0x8a4>
     8e8: ea000000 b 8f0 <__bswap_32+0x8a8>
     8ec: ffffe878 ; <UNDEFINED> instruction: 0xffffe878
     8f0: e08b0000 add r0, fp, r0
     8f4: e0800001 add r0, r0, r1
     8f8: e3a0105c mov r1, #92 ; 0x5c
     8fc: e5c01000 strb r1, [r0]
/home/mingo/dev/fossil/./src/translate.c:130
     900: e51b0008 ldr r0, [fp, #-8]
     904: e1a01000 mov r1, r0
     908: e2800001 add r0, r0, #1
     90c: e50b0008 str r0, [fp, #-8]
     910: e59f0000 ldr r0, [pc] ; 918 <__bswap_32+0x8d0>
     914: ea000000 b 91c <__bswap_32+0x8d4>
     918: ffffe878 ; <UNDEFINED> instruction: 0xffffe878
     91c: e08b0000 add r0, fp, r0
     920: e0800001 add r0, r0, r1
     924: e59f1000 ldr r1, [pc] ; 92c <__bswap_32+0x8e4>
     928: ea000000 b 930 <__bswap_32+0x8e8>
     92c: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     930: e08b1001 add r1, fp, r1
     934: e51b2004 ldr r2, [fp, #-4]
     938: e0811002 add r1, r1, r2
     93c: e5d12000 ldrb r2, [r1]
     940: e5c02000 strb r2, [r0]
     944: eaffffad b 800 <__bswap_32+0x7b8>
/home/mingo/dev/fossil/./src/translate.c:132
     948: e51b0008 ldr r0, [fp, #-8]
     94c: e3500000 cmp r0, #0
     950: da000014 ble 9a8 <__bswap_32+0x960>
     954: ebfffffe bl 0 <__ctype_b_loc>
954: R_ARM_PC24 __ctype_b_loc
     958: e51b1008 ldr r1, [fp, #-8]
     95c: e2411001 sub r1, r1, #1
     960: e59f2000 ldr r2, [pc] ; 968 <__bswap_32+0x920>
     964: ea000000 b 96c <__bswap_32+0x924>
     968: ffffe878 ; <UNDEFINED> instruction: 0xffffe878
     96c: e08b2002 add r2, fp, r2
     970: e0821001 add r1, r2, r1
     974: e5d12000 ldrb r2, [r1]
     978: e1a02082 lsl r2, r2, #1
     97c: e5901000 ldr r1, [r0]
     980: e0811002 add r1, r1, r2
     984: e1d100b0 ldrh r0, [r1]
     988: e2000a02 and r0, r0, #8192 ; 0x2000
     98c: e3500000 cmp r0, #0
     990: 0a000004 beq 9a8 <__bswap_32+0x960>
     994: e51b0008 ldr r0, [fp, #-8]
     998: e1a01000 mov r1, r0
     99c: e2400001 sub r0, r0, #1
     9a0: e50b0008 str r0, [fp, #-8]
     9a4: eaffffe7 b 948 <__bswap_32+0x900>
/home/mingo/dev/fossil/./src/translate.c:133
     9a8: e59f0000 ldr r0, [pc] ; 9b0 <__bswap_32+0x968>
     9ac: ea000000 b 9b4 <__bswap_32+0x96c>
     9b0: ffffe878 ; <UNDEFINED> instruction: 0xffffe878
     9b4: e08b0000 add r0, fp, r0
     9b8: e51b1008 ldr r1, [fp, #-8]
     9bc: e0800001 add r0, r0, r1
     9c0: e3a01000 mov r1, #0
     9c4: e5c01000 strb r1, [r0]
/home/mingo/dev/fossil/./src/translate.c:134
     9c8: e51b0008 ldr r0, [fp, #-8]
     9cc: e3500000 cmp r0, #0
     9d0: ca000009 bgt 9fc <__bswap_32+0x9b4>
     9d4: e24bea01 sub lr, fp, #4096 ; 0x1000
     9d8: e51e0790 ldr r0, [lr, #-1936] ; 0x790
     9dc: e3500000 cmp r0, #0
     9e0: 0a000005 beq 9fc <__bswap_32+0x9b4>
/home/mingo/dev/fossil/./src/translate.c:135
     9e4: e59f1000 ldr r1, [pc] ; 9ec <__bswap_32+0x9a4>
     9e8: ea000000 b 9f0 <__bswap_32+0x9a8>
     9ec: 00000000 andeq r0, r0, r0
9ec: R_ARM_ABS32 L.27
     9f0: e59b0010 ldr r0, [fp, #16]
     9f4: ebfffffe bl 0 <fprintf>
9f4: R_ARM_PC24 fprintf
     9f8: ea00000f b a3c <__bswap_32+0x9f4>
/home/mingo/dev/fossil/./src/translate.c:137
     9fc: e59f0000 ldr r0, [pc] ; a04 <__bswap_32+0x9bc>
     a00: ea000000 b a08 <__bswap_32+0x9c0>
     a04: ffffe878 ; <UNDEFINED> instruction: 0xffffe878
     a08: e08b0000 add r0, fp, r0
     a0c: e52d0004 push {r0} ; (str r0, [sp, #-4]!)
     a10: e59f3000 ldr r3, [pc] ; a18 <__bswap_32+0x9d0>
     a14: ea000000 b a1c <__bswap_32+0x9d4>
     a18: 00000000 andeq r0, r0, r0
a18: R_ARM_ABS32 L.29
     a1c: e24bea01 sub lr, fp, #4096 ; 0x1000
     a20: e51e278c ldr r2, [lr, #-1932] ; 0x78c
     a24: e59f1000 ldr r1, [pc] ; a2c <__bswap_32+0x9e4>
     a28: ea000000 b a30 <__bswap_32+0x9e8>
     a2c: 00000000 andeq r0, r0, r0
a2c: R_ARM_ABS32 L.28
     a30: e59b0010 ldr r0, [fp, #16]
     a34: ebfffffe bl 0 <fprintf>
a34: R_ARM_PC24 fprintf
     a38: e28ddefa add sp, sp, #4000 ; 0xfa0
     a3c: ea000170 b 1004 <__bswap_32+0xfbc>
/home/mingo/dev/fossil/./src/translate.c:149
     a40: e51b0004 ldr r0, [fp, #-4]
     a44: e1a01000 mov r1, r0
     a48: e2800001 add r0, r0, #1
     a4c: e50b0004 str r0, [fp, #-4]
/home/mingo/dev/fossil/./src/translate.c:150
     a50: ebfffffe bl 0 <__ctype_b_loc>
a50: R_ARM_PC24 __ctype_b_loc
     a54: e59f1000 ldr r1, [pc] ; a5c <__bswap_32+0xa14>
     a58: ea000000 b a60 <__bswap_32+0xa18>
     a5c: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     a60: e08b1001 add r1, fp, r1
     a64: e51b2004 ldr r2, [fp, #-4]
     a68: e0811002 add r1, r1, r2
     a6c: e5d12000 ldrb r2, [r1]
     a70: e1a02082 lsl r2, r2, #1
     a74: e5901000 ldr r1, [r0]
     a78: e0811002 add r1, r1, r2
     a7c: e1d100b0 ldrh r0, [r1]
     a80: e2000a02 and r0, r0, #8192 ; 0x2000
     a84: e3500000 cmp r0, #0
     a88: 0a000003 beq a9c <__bswap_32+0xa54>
     a8c: e51b0004 ldr r0, [fp, #-4]
     a90: e1a01000 mov r1, r0
     a94: e2800001 add r0, r0, #1
     a98: e50b0004 str r0, [fp, #-4]
/home/mingo/dev/fossil/./src/translate.c:151
     a9c: e51b0004 ldr r0, [fp, #-4]
     aa0: e24bea01 sub lr, fp, #4096 ; 0x1000
     aa4: e50e0794 str r0, [lr, #-1940] ; 0x794
/home/mingo/dev/fossil/./src/translate.c:152
     aa8: e3a00000 mov r0, #0
     aac: e50b0008 str r0, [fp, #-8]
     ab0: e59f0000 ldr r0, [pc] ; ab8 <__bswap_32+0xa70>
     ab4: ea000000 b abc <__bswap_32+0xa74>
     ab8: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     abc: e08b0000 add r0, fp, r0
     ac0: e51b1004 ldr r1, [fp, #-4]
     ac4: e0800001 add r0, r0, r1
     ac8: e5d01000 ldrb r1, [r0]
     acc: e3511000 cmp r1, #0
     ad0: 0a000112 beq f20 <__bswap_32+0xed8>
     ad4: e59f0000 ldr r0, [pc] ; adc <__bswap_32+0xa94>
     ad8: ea000000 b ae0 <__bswap_32+0xa98>
     adc: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     ae0: e08b0000 add r0, fp, r0
     ae4: e51b1004 ldr r1, [fp, #-4]
     ae8: e0800001 add r0, r0, r1
     aec: e5d01000 ldrb r1, [r0]
     af0: e351100d cmp r1, #13
     af4: 0a000109 beq f20 <__bswap_32+0xed8>
     af8: e59f0000 ldr r0, [pc] ; b00 <__bswap_32+0xab8>
     afc: ea000000 b b04 <__bswap_32+0xabc>
     b00: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     b04: e08b0000 add r0, fp, r0
     b08: e51b1004 ldr r1, [fp, #-4]
     b0c: e0800001 add r0, r0, r1
     b10: e5d01000 ldrb r1, [r0]
     b14: e351100a cmp r1, #10
     b18: 0a000100 beq f20 <__bswap_32+0xed8>
     b1c: ea000004 b b34 <__bswap_32+0xaec>
     b20: e51b0004 ldr r0, [fp, #-4]
     b24: e1a01000 mov r1, r0
     b28: e2800001 add r0, r0, #1
     b2c: e50b0004 str r0, [fp, #-4]
     b30: eaffffde b ab0 <__bswap_32+0xa68>
/home/mingo/dev/fossil/./src/translate.c:153
     b34: e59f0000 ldr r0, [pc] ; b3c <__bswap_32+0xaf4>
     b38: ea000000 b b40 <__bswap_32+0xaf8>
     b3c: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     b40: e08b0000 add r0, fp, r0
     b44: e51b1004 ldr r1, [fp, #-4]
     b48: e0800001 add r0, r0, r1
     b4c: e5d01000 ldrb r1, [r0]
     b50: e3511022 cmp r1, #34 ; 0x22
     b54: 0a000009 beq b80 <__bswap_32+0xb38>
     b58: e59f0000 ldr r0, [pc] ; b60 <__bswap_32+0xb18>
     b5c: ea000000 b b64 <__bswap_32+0xb1c>
     b60: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     b64: e08b0000 add r0, fp, r0
     b68: e51b1004 ldr r1, [fp, #-4]
     b6c: e0800001 add r0, r0, r1
     b70: e5d01000 ldrb r1, [r0]
     b74: e351105c cmp r1, #92 ; 0x5c
     b78: 0a000000 beq b80 <__bswap_32+0xb38>
     b7c: ea00000a b bac <__bswap_32+0xb64>
     b80: e51b0008 ldr r0, [fp, #-8]
     b84: e1a01000 mov r1, r0
     b88: e2800001 add r0, r0, #1
     b8c: e50b0008 str r0, [fp, #-8]
     b90: e59f0000 ldr r0, [pc] ; b98 <__bswap_32+0xb50>
     b94: ea000000 b b9c <__bswap_32+0xb54>
     b98: ffffe878 ; <UNDEFINED> instruction: 0xffffe878
     b9c: e08b0000 add r0, fp, r0
     ba0: e0800001 add r0, r0, r1
     ba4: e3a0105c mov r1, #92 ; 0x5c
     ba8: e5c01000 strb r1, [r0]
/home/mingo/dev/fossil/./src/translate.c:154
     bac: e51b0008 ldr r0, [fp, #-8]
     bb0: e1a01000 mov r1, r0
     bb4: e2800001 add r0, r0, #1
     bb8: e50b0008 str r0, [fp, #-8]
     bbc: e59f0000 ldr r0, [pc] ; bc4 <__bswap_32+0xb7c>
     bc0: ea000000 b bc8 <__bswap_32+0xb80>
     bc4: ffffe878 ; <UNDEFINED> instruction: 0xffffe878
     bc8: e08b0000 add r0, fp, r0
     bcc: e0800001 add r0, r0, r1
     bd0: e59f1000 ldr r1, [pc] ; bd8 <__bswap_32+0xb90>
     bd4: ea000000 b bdc <__bswap_32+0xb94>
     bd8: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     bdc: e08b1001 add r1, fp, r1
     be0: e51b2004 ldr r2, [fp, #-4]
     be4: e0811002 add r1, r1, r2
     be8: e5d12000 ldrb r2, [r1]
     bec: e5c02000 strb r2, [r0]
/home/mingo/dev/fossil/./src/translate.c:155
     bf0: e59f0000 ldr r0, [pc] ; bf8 <__bswap_32+0xbb0>
     bf4: ea000000 b bfc <__bswap_32+0xbb4>
     bf8: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     bfc: e08b0000 add r0, fp, r0
     c00: e51b1004 ldr r1, [fp, #-4]
     c04: e0800001 add r0, r0, r1
     c08: e5d01000 ldrb r1, [r0]
     c0c: e3511025 cmp r1, #37 ; 0x25
     c10: 1a000014 bne c68 <__bswap_32+0xc20>
     c14: e51b0004 ldr r0, [fp, #-4]
     c18: e2800001 add r0, r0, #1
     c1c: e59f1000 ldr r1, [pc] ; c24 <__bswap_32+0xbdc>
     c20: ea000000 b c28 <__bswap_32+0xbe0>
     c24: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     c28: e08b1001 add r1, fp, r1
     c2c: e0810000 add r0, r1, r0
     c30: e5d01000 ldrb r1, [r0]
     c34: e3511025 cmp r1, #37 ; 0x25
     c38: 0a00000a beq c68 <__bswap_32+0xc20>
     c3c: e51b0004 ldr r0, [fp, #-4]
     c40: e2800001 add r0, r0, #1
     c44: e59f1000 ldr r1, [pc] ; c4c <__bswap_32+0xc04>
     c48: ea000000 b c50 <__bswap_32+0xc08>
     c4c: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     c50: e08b1001 add r1, fp, r1
     c54: e0810000 add r0, r1, r0
     c58: e5d01000 ldrb r1, [r0]
     c5c: e3511000 cmp r1, #0
     c60: 0a000000 beq c68 <__bswap_32+0xc20>
     c64: ea000000 b c6c <__bswap_32+0xc24>
     c68: eaffffac b b20 <__bswap_32+0xad8>
/home/mingo/dev/fossil/./src/translate.c:156
     c6c: e3a00001 mov r0, #1
     c70: e24bea01 sub lr, fp, #4096 ; 0x1000
     c74: e50e0798 str r0, [lr, #-1944] ; 0x798
     c78: e51b0004 ldr r0, [fp, #-4]
     c7c: e24bea01 sub lr, fp, #4096 ; 0x1000
     c80: e51e1798 ldr r1, [lr, #-1944] ; 0x798
     c84: e0800001 add r0, r0, r1
     c88: e59f1000 ldr r1, [pc] ; c90 <__bswap_32+0xc48>
     c8c: ea000000 b c94 <__bswap_32+0xc4c>
     c90: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     c94: e08b1001 add r1, fp, r1
     c98: e0810000 add r0, r1, r0
     c9c: e5d01000 ldrb r1, [r0]
     ca0: e3511000 cmp r1, #0
     ca4: 0a000014 beq cfc <__bswap_32+0xcb4>
     ca8: e51b0004 ldr r0, [fp, #-4]
     cac: e24bea01 sub lr, fp, #4096 ; 0x1000
     cb0: e51e1798 ldr r1, [lr, #-1944] ; 0x798
     cb4: e0800001 add r0, r0, r1
     cb8: e59f1000 ldr r1, [pc] ; cc0 <__bswap_32+0xc78>
     cbc: ea000000 b cc4 <__bswap_32+0xc7c>
     cc0: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     cc4: e08b1001 add r1, fp, r1
     cc8: e0810000 add r0, r1, r0
     ccc: e5d01000 ldrb r1, [r0]
     cd0: e3511028 cmp r1, #40 ; 0x28
     cd4: 0a000008 beq cfc <__bswap_32+0xcb4>
     cd8: ea000006 b cf8 <__bswap_32+0xcb0>
     cdc: e24bea01 sub lr, fp, #4096 ; 0x1000
     ce0: e51e0798 ldr r0, [lr, #-1944] ; 0x798
     ce4: e1a01000 mov r1, r0
     ce8: e2800001 add r0, r0, #1
     cec: e24bea01 sub lr, fp, #4096 ; 0x1000
     cf0: e50e0798 str r0, [lr, #-1944] ; 0x798
     cf4: eaffffdf b c78 <__bswap_32+0xc30>
     cf8: eafffff7 b cdc <__bswap_32+0xc94>
/home/mingo/dev/fossil/./src/translate.c:157
     cfc: e51b0004 ldr r0, [fp, #-4]
     d00: e24bea01 sub lr, fp, #4096 ; 0x1000
     d04: e51e1798 ldr r1, [lr, #-1944] ; 0x798
     d08: e0800001 add r0, r0, r1
     d0c: e59f1000 ldr r1, [pc] ; d14 <__bswap_32+0xccc>
     d10: ea000000 b d18 <__bswap_32+0xcd0>
     d14: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     d18: e08b1001 add r1, fp, r1
     d1c: e0810000 add r0, r1, r0
     d20: e5d01000 ldrb r1, [r0]
     d24: e3511028 cmp r1, #40 ; 0x28
     d28: 1a000013 bne d7c <__bswap_32+0xd34>
     d2c: ebfffffe bl 0 <__ctype_b_loc>
d2c: R_ARM_PC24 __ctype_b_loc
     d30: e51b1004 ldr r1, [fp, #-4]
     d34: e24bea01 sub lr, fp, #4096 ; 0x1000
     d38: e51e2798 ldr r2, [lr, #-1944] ; 0x798
     d3c: e0811002 add r1, r1, r2
     d40: e2411001 sub r1, r1, #1
     d44: e59f2000 ldr r2, [pc] ; d4c <__bswap_32+0xd04>
     d48: ea000000 b d50 <__bswap_32+0xd08>
     d4c: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     d50: e08b2002 add r2, fp, r2
     d54: e0821001 add r1, r2, r1
     d58: e5d12000 ldrb r2, [r1]
     d5c: e1a02082 lsl r2, r2, #1
     d60: e5901000 ldr r1, [r0]
     d64: e0811002 add r1, r1, r2
     d68: e1d100b0 ldrh r0, [r1]
     d6c: e2000b01 and r0, r0, #1024 ; 0x400
     d70: e3500000 cmp r0, #0
     d74: 0a000000 beq d7c <__bswap_32+0xd34>
     d78: ea000000 b d80 <__bswap_32+0xd38>
     d7c: eaffff67 b b20 <__bswap_32+0xad8>
/home/mingo/dev/fossil/./src/translate.c:158
     d80: e24bea01 sub lr, fp, #4096 ; 0x1000
     d84: e51e0798 ldr r0, [lr, #-1944] ; 0x798
     d88: e2400001 sub r0, r0, #1
     d8c: e24bea01 sub lr, fp, #4096 ; 0x1000
     d90: e50e0798 str r0, [lr, #-1944] ; 0x798
     d94: e3500000 cmp r0, #0
     d98: 0a000013 beq dec <__bswap_32+0xda4>
     d9c: e51b0008 ldr r0, [fp, #-8]
     da0: e1a01000 mov r1, r0
     da4: e2800001 add r0, r0, #1
     da8: e50b0008 str r0, [fp, #-8]
     dac: e59f0000 ldr r0, [pc] ; db4 <__bswap_32+0xd6c>
     db0: ea000000 b db8 <__bswap_32+0xd70>
     db4: ffffe878 ; <UNDEFINED> instruction: 0xffffe878
     db8: e08b0000 add r0, fp, r0
     dbc: e0800001 add r0, r0, r1
     dc0: e51b1004 ldr r1, [fp, #-4]
     dc4: e2811001 add r1, r1, #1
     dc8: e50b1004 str r1, [fp, #-4]
     dcc: e59f2000 ldr r2, [pc] ; dd4 <__bswap_32+0xd8c>
     dd0: ea000000 b dd8 <__bswap_32+0xd90>
     dd4: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     dd8: e08b2002 add r2, fp, r2
     ddc: e0821001 add r1, r2, r1
     de0: e5d12000 ldrb r2, [r1]
     de4: e5c02000 strb r2, [r0]
     de8: eaffffe4 b d80 <__bswap_32+0xd38>
/home/mingo/dev/fossil/./src/translate.c:159
     dec: e59fe000 ldr lr, [pc] ; df4 <__bswap_32+0xdac>
     df0: ea000000 b df8 <__bswap_32+0xdb0>
     df4: 00000000 andeq r0, r0, r0
df4: R_ARM_ABS32 nArg
     df8: e59e0000 ldr r0, [lr]
     dfc: e1a01000 mov r1, r0
     e00: e2800001 add r0, r0, #1
     e04: e59fe000 ldr lr, [pc] ; e0c <__bswap_32+0xdc4>
     e08: ea000000 b e10 <__bswap_32+0xdc8>
     e0c: 00000000 andeq r0, r0, r0
e0c: R_ARM_ABS32 nArg
     e10: e58e0000 str r0, [lr]
     e14: e59f0000 ldr r0, [pc] ; e1c <__bswap_32+0xdd4>
     e18: ea000000 b e20 <__bswap_32+0xdd8>
     e1c: 00000000 andeq r0, r0, r0
e1c: R_ARM_ABS32 zArg
     e20: e0800001 add r0, r0, r1
     e24: e3a0102c mov r1, #44 ; 0x2c
     e28: e5c01000 strb r1, [r0]
/home/mingo/dev/fossil/./src/translate.c:160
     e2c: e3a00000 mov r0, #0
     e30: e50b000c str r0, [fp, #-12]
     e34: e51b0004 ldr r0, [fp, #-4]
     e38: e1a01000 mov r1, r0
     e3c: e2800001 add r0, r0, #1
     e40: e50b0004 str r0, [fp, #-4]
/home/mingo/dev/fossil/./src/translate.c:161
     e44: e59f0000 ldr r0, [pc] ; e4c <__bswap_32+0xe04>
     e48: ea000000 b e50 <__bswap_32+0xe08>
     e4c: fffff818 ; <UNDEFINED> instruction: 0xfffff818
     e50: e08b0000 add r0, fp, r0
     e54: e51b1004 ldr r1, [fp, #-4]
     e58: e0800001 add r0, r0, r1
     e5c: e5d01000 ldrb r1, [r0]
     e60: e24bea01 sub lr, fp, #4096 ; 0x1000
     e64: e54e1799 strb r1, [lr, #-1945] ; 0x799
     e68: e3511000 cmp r1, #0
     e6c: 0a00002a beq f1c <__bswap_32+0xed4>
/home/mingo/dev/fossil/./src/translate.c:162
     e70: e59fe000 ldr lr, [pc] ; e78 <__bswap_32+0xe30>
     e74: ea000000 b e7c <__bswap_32+0xe34>
     e78: 00000000 andeq r0, r0, r0
e78: R_ARM_ABS32 nArg
     e7c: e59e0000 ldr r0, [lr]
     e80: e1a01000 mov r1, r0
     e84: e2800001 add r0, r0, #1
     e88: e59fe000 ldr lr, [pc] ; e90 <__bswap_32+0xe48>
     e8c: ea000000 b e94 <__bswap_32+0xe4c>
     e90: 00000000 andeq r0, r0, r0
e90: R_ARM_ABS32 nArg
     e94: e58e0000 str r0, [lr]
     e98: e59f0000 ldr r0, [pc] ; ea0 <__bswap_32+0xe58>
     e9c: ea000000 b ea4 <__bswap_32+0xe5c>
     ea0: 00000000 andeq r0, r0, r0
ea0: R_ARM_ABS32 zArg
     ea4: e0800001 add r0, r0, r1
     ea8: e24bea01 sub lr, fp, #4096 ; 0x1000
     eac: e55e1799 ldrb r1, [lr, #-1945] ; 0x799
     eb0: e5c01000 strb r1, [r0]
/home/mingo/dev/fossil/./src/translate.c:163
     eb4: e24bea01 sub lr, fp, #4096 ; 0x1000
     eb8: e55e0799 ldrb r0, [lr, #-1945] ; 0x799
     ebc: e3500029 cmp r0, #41 ; 0x29
     ec0: 1a000008 bne ee8 <__bswap_32+0xea0>
/home/mingo/dev/fossil/./src/translate.c:164
     ec4: e51b000c ldr r0, [fp, #-12]
     ec8: e1a01000 mov r1, r0
     ecc: e2400001 sub r0, r0, #1
     ed0: e50b000c str r0, [fp, #-12]
/home/mingo/dev/fossil/./src/translate.c:165
     ed4: e51b000c ldr r0, [fp, #-12]
     ed8: e3500000 cmp r0, #0
     edc: 1a000000 bne ee4 <__bswap_32+0xe9c>
     ee0: ea00000d b f1c <__bswap_32+0xed4>
     ee4: ea000007 b f08 <__bswap_32+0xec0>
/home/mingo/dev/fossil/./src/translate.c:166
     ee8: e24bea01 sub lr, fp, #4096 ; 0x1000
     eec: e55e0799 ldrb r0, [lr, #-1945] ; 0x799
     ef0: e3500028 cmp r0, #40 ; 0x28
     ef4: 1a000003 bne f08 <__bswap_32+0xec0>
/home/mingo/dev/fossil/./src/translate.c:167
     ef8: e51b000c ldr r0, [fp, #-12]
     efc: e1a01000 mov r1, r0
     f00: e2800001 add r0, r0, #1
     f04: e50b000c str r0, [fp, #-12]
/home/mingo/dev/fossil/./src/translate.c:169
     f08: e51b0004 ldr r0, [fp, #-4]
     f0c: e1a01000 mov r1, r0
     f10: e2800001 add r0, r0, #1
     f14: e50b0004 str r0, [fp, #-4]
     f18: eaffffc9 b e44 <__bswap_32+0xdfc>
     f1c: eafffeff b b20 <__bswap_32+0xad8>
/home/mingo/dev/fossil/./src/translate.c:172
     f20: e59f0000 ldr r0, [pc] ; f28 <__bswap_32+0xee0>
     f24: ea000000 b f2c <__bswap_32+0xee4>
     f28: ffffe878 ; <UNDEFINED> instruction: 0xffffe878
     f2c: e08b0000 add r0, fp, r0
     f30: e51b1008 ldr r1, [fp, #-8]
     f34: e0800001 add r0, r0, r1
     f38: e3a01000 mov r1, #0
     f3c: e5c01000 strb r1, [r0]
/home/mingo/dev/fossil/./src/translate.c:173
     f40: e59fe000 ldr lr, [pc] ; f48 <__bswap_32+0xf00>
     f44: ea000000 b f4c <__bswap_32+0xf04>
     f48: 00000000 andeq r0, r0, r0
f48: R_ARM_ABS32 inPrint
     f4c: e59e0000 ldr r0, [lr]
     f50: e3500000 cmp r0, #0
     f54: 0a000000 beq f5c <__bswap_32+0xf14>
     f58: ea000017 b fbc <__bswap_32+0xf74>
/home/mingo/dev/fossil/./src/translate.c:174
     f5c: e24bea01 sub lr, fp, #4096 ; 0x1000
     f60: e51e0794 ldr r0, [lr, #-1940] ; 0x794
     f64: e2400002 sub r0, r0, #2
     f68: e59f1000 ldr r1, [pc] ; f70 <__bswap_32+0xf28>
     f6c: ea000000 b f74 <__bswap_32+0xf2c>
     f70: ffffe878 ; <UNDEFINED> instruction: 0xffffe878
     f74: e08b1001 add r1, fp, r1
     f78: e52d1004 push {r1} ; (str r1, [sp, #-4]!)
     f7c: e59f3000 ldr r3, [pc] ; f84 <__bswap_32+0xf3c>
     f80: ea000000 b f88 <__bswap_32+0xf40>
     f84: 00000000 andeq r0, r0, r0
f84: R_ARM_ABS32 L.31
     f88: e1a02000 mov r2, r0
     f8c: e59f1000 ldr r1, [pc] ; f94 <__bswap_32+0xf4c>
     f90: ea000000 b f98 <__bswap_32+0xf50>
     f94: 00000000 andeq r0, r0, r0
f94: R_ARM_ABS32 L.30
     f98: e59b0010 ldr r0, [fp, #16]
     f9c: ebfffffe bl 0 <fprintf>
f9c: R_ARM_PC24 fprintf
     fa0: e28ddefa add sp, sp, #4000 ; 0xfa0
/home/mingo/dev/fossil/./src/translate.c:175
     fa4: e3a00001 mov r0, #1
     fa8: e59fe000 ldr lr, [pc] ; fb0 <__bswap_32+0xf68>
     fac: ea000000 b fb4 <__bswap_32+0xf6c>
     fb0: 00000000 andeq r0, r0, r0
fb0: R_ARM_ABS32 inPrint
     fb4: e58e0000 str r0, [lr]
     fb8: ea000011 b 1004 <__bswap_32+0xfbc>
/home/mingo/dev/fossil/./src/translate.c:177
     fbc: e24bea01 sub lr, fp, #4096 ; 0x1000
     fc0: e51e0794 ldr r0, [lr, #-1940] ; 0x794
     fc4: e2800005 add r0, r0, #5
     fc8: e59f1000 ldr r1, [pc] ; fd0 <__bswap_32+0xf88>
     fcc: ea000000 b fd4 <__bswap_32+0xf8c>
     fd0: ffffe878 ; <UNDEFINED> instruction: 0xffffe878
     fd4: e08b1001 add r1, fp, r1
     fd8: e52d1004 push {r1} ; (str r1, [sp, #-4]!)
     fdc: e59f3000 ldr r3, [pc] ; fe4 <__bswap_32+0xf9c>
     fe0: ea000000 b fe8 <__bswap_32+0xfa0>
     fe4: 00000000 andeq r0, r0, r0
fe4: R_ARM_ABS32 L.33
     fe8: e1a02000 mov r2, r0
     fec: e59f1000 ldr r1, [pc] ; ff4 <__bswap_32+0xfac>
     ff0: ea000000 b ff8 <__bswap_32+0xfb0>
     ff4: 00000000 andeq r0, r0, r0
ff4: R_ARM_ABS32 L.32
     ff8: e59b0010 ldr r0, [fp, #16]
     ffc: ebfffffe bl 0 <fprintf>
ffc: R_ARM_PC24 fprintf
    1000: e28ddefa add sp, sp, #4000 ; 0xfa0
    1004: eafffd14 b 45c <__bswap_32+0x414>
    1008: e89ba800 ldm fp, {fp, sp, pc}
    100c: e59fc004 ldr ip, [pc, #4] ; 1018 <__bswap_32+0xfd0>
    1010: e04bd00c sub sp, fp, ip
    1014: e1a0f00e mov pc, lr
    1018: 0000179c muleq r0, ip, r7

-----


On Fri, Mar 28, 2014 at 12:02 PM, Domingo Alvarez Duarte <address@hidden> wrote:
And also on ubuntu 13.10 arm for the fossil-scm compiled with tcc:

==16261== Nulgrind, the minimal Valgrind tool
==16261== Copyright (C) 2002-2012, and GNU GPL'd, by Nicholas Nethercote.
==16261== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==16261== Command: bld/translate ./src/branch.c
==16261== 

valgrind: m_debuginfo/readelf.c:2309 (vgModuleLocal_read_elf_debug_info): Assertion 'crc_offset + sizeof(UInt) <= debuglink_sz' failed.
==16261==    at 0x380ABB88: ??? (in /usr/lib/valgrind/none-arm-linux)



On Fri, Mar 28, 2014 at 11:51 AM, Domingo Alvarez Duarte <address@hidden> wrote:
Now that valgrind works I run it on linux X86_64 against fossil-scm compiled with tcc and got this:

==32200== Nulgrind, the minimal Valgrind tool
==32200== Copyright (C) 2002-2013, and GNU GPL'd, by Nicholas Nethercote.
==32200== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==32200== Command: /home/mingo/dev/c/fossil-src-20140127173344/fossil server
==32200== 
==32200== 
==32200== Process terminating with default action of signal 11 (SIGSEGV)
==32200==  Access not within mapped region at address 0x18
==32200==    at 0x46BEB49: _int_malloc (malloc.c:3827)
==32200==    by 0x46C0F94: malloc (malloc.c:2924)
==32200==    by 0x8220083: __va_start (in /home/mingo/dev/c/fossil-src-20140127173344/fossil)

Any clue on this ?
Cheers ! 


On Fri, Mar 28, 2014 at 10:59 AM, Domingo Alvarez Duarte <address@hidden> wrote:
Hello !

Trying to test tinycc on linux X86_64 I get this error with valgrind:

Inconsistency detected by ld.so: rtld.c: 1284: dl_main: Assertion `_rtld_local._dl_rtld_map.l_libname' failed!

Comparing the headers generated by other compilers it seem that tinycc is missing the PHDR entry, and making the following preprocessor test always true on tccelf.c seems to fix the problem, anyone knows this better and can explain it ?

#if 1 //<<<<<<<<<<<<<< //defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#define HAVE_PHDR       1
#define EXTRA_RELITEMS  14

/* move the relocation value from .dynsym to .got */
void patch_dynsym_undef(TCCState *s1, Section *s)

Cheers !




reply via email to

[Prev in Thread] Current Thread [Next in Thread]