RTEMS-6
Annotated Report
libuntar
Mon Mar 1 00:29:02 2021
00000000400256a0 <Untar_FromChunk_Print>:
context->base.printer = printer;
400256a0: f9004c03 str x3, [x0, #152]
while (todo > 0) {
400256a4: b4001042 cbz x2, 400258ac <Untar_FromChunk_Print+0x20c>
{
400256a8: a9ba7bfd stp x29, x30, [sp, #-96]!
400256ac: 910003fd mov x29, sp
400256b0: a90153f3 stp x19, x20, [sp, #16]
400256b4: aa0103f4 mov x20, x1
400256b8: a9025bf5 stp x21, x22, [sp, #32]
if (strncmp(&bufr[257], "ustar", 5)) {
400256bc: b00000d5 adrp x21, 4003e000 <tar01_tar_gz_size+0x3f8>
400256c0: 913182b5 add x21, x21, #0xc60
{
400256c4: a9046bf9 stp x25, x26, [sp, #64]
400256c8: aa0003f9 mov x25, x0
400256cc: aa0203fa mov x26, x2
remaining = 512 - context->done_bytes;
400256d0: d2804016 mov x22, #0x200 // #512
{
400256d4: a90363f7 stp x23, x24, [sp, #48]
context->out_fd = -1;
400256d8: 12800018 mov w24, #0xffffffff // #-1
context->state = UNTAR_CHUNK_SKIP;
400256dc: 52800037 mov w23, #0x1 // #1
{
400256e0: f9002bfb str x27, [sp, #80]
done = 0;
400256e4: d280001b mov x27, #0x0 // #0
switch (context->state) {
400256e8: b9410723 ldr w3, [x25, #260]
400256ec: 7100047f cmp w3, #0x1
400256f0: 54000180 b.eq 40025720 <Untar_FromChunk_Print+0x80> // b.none
400256f4: 7100087f cmp w3, #0x2
400256f8: 540007e0 b.eq 400257f4 <Untar_FromChunk_Print+0x154> // b.none
400256fc: 340003a3 cbz w3, 40025770 <Untar_FromChunk_Print+0xd0> <== ALWAYS TAKEN
40025700: 52800020 mov w0, #0x1 // #1 <== NOT EXECUTED
}
40025704: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40025708: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
4002570c: a94363f7 ldp x23, x24, [sp, #48] <== NOT EXECUTED
40025710: a9446bf9 ldp x25, x26, [sp, #64] <== NOT EXECUTED
40025714: f9402bfb ldr x27, [sp, #80] <== NOT EXECUTED
40025718: a8c67bfd ldp x29, x30, [sp], #96 <== NOT EXECUTED
4002571c: d65f03c0 ret <== NOT EXECUTED
remaining = context->base.file_size - context->done_bytes;
40025720: f9404321 ldr x1, [x25, #128]
40025724: f9418723 ldr x3, [x25, #776]
40025728: cb030033 sub x19, x1, x3
consume = MIN(remaining, todo);
4002572c: eb1a027f cmp x19, x26
40025730: 9a9a9273 csel x19, x19, x26, ls // ls = plast
context->done_bytes += consume;
40025734: 8b130063 add x3, x3, x19
40025738: f9018723 str x3, [x25, #776]
if (context->done_bytes == context->base.file_size) {
4002573c: eb03003f cmp x1, x3
40025740: 540008c0 b.eq 40025858 <Untar_FromChunk_Print+0x1b8> // b.none
done += consume;
40025744: 8b13037b add x27, x27, x19
while (todo > 0) {
40025748: eb13035a subs x26, x26, x19
4002574c: 54fffce1 b.ne 400256e8 <Untar_FromChunk_Print+0x48> // b.any <== NEVER TAKEN
return UNTAR_SUCCESSFUL;
40025750: 52800000 mov w0, #0x0 // #0
}
40025754: a94153f3 ldp x19, x20, [sp, #16]
40025758: a9425bf5 ldp x21, x22, [sp, #32]
4002575c: a94363f7 ldp x23, x24, [sp, #48]
40025760: a9446bf9 ldp x25, x26, [sp, #64]
40025764: f9402bfb ldr x27, [sp, #80]
40025768: a8c67bfd ldp x29, x30, [sp], #96
4002576c: d65f03c0 ret
remaining = 512 - context->done_bytes;
40025770: f9418723 ldr x3, [x25, #776]
memcpy(&context->header[context->done_bytes], &buf[done], consume);
40025774: 8b1b0281 add x1, x20, x27
remaining = 512 - context->done_bytes;
40025778: cb0302d3 sub x19, x22, x3
memcpy(&context->header[context->done_bytes], &buf[done], consume);
4002577c: 91042063 add x3, x3, #0x108
consume = MIN(remaining, todo);
40025780: eb1a027f cmp x19, x26
memcpy(&context->header[context->done_bytes], &buf[done], consume);
40025784: 8b030320 add x0, x25, x3
consume = MIN(remaining, todo);
40025788: 9a9a9273 csel x19, x19, x26, ls // ls = plast
memcpy(&context->header[context->done_bytes], &buf[done], consume);
4002578c: aa1303e2 mov x2, x19
40025790: 940031d5 bl 40031ee4 <memcpy>
context->done_bytes += consume;
40025794: f9418721 ldr x1, [x25, #776]
40025798: 8b010261 add x1, x19, x1
4002579c: f9018721 str x1, [x25, #776]
if (context->done_bytes == 512) {
400257a0: f108003f cmp x1, #0x200
400257a4: 54fffd01 b.ne 40025744 <Untar_FromChunk_Print+0xa4> // b.any
ctx->file_name[0] = '\0';
400257a8: f9400724 ldr x4, [x25, #8]
ctx->linkflag = -1;
400257ac: 12800003 mov w3, #0xffffffff // #-1
if (strncmp(&bufr[257], "ustar", 5)) {
400257b0: aa1503e1 mov x1, x21
400257b4: 91082720 add x0, x25, #0x209
400257b8: d28000a2 mov x2, #0x5 // #5
ctx->file_name[0] = '\0';
400257bc: 3900009f strb wzr, [x4]
ctx->nblocks = 0;
400257c0: a9087f3f stp xzr, xzr, [x25, #128]
ctx->linkflag = -1;
400257c4: 39024323 strb w3, [x25, #144]
if (strncmp(&bufr[257], "ustar", 5)) {
400257c8: 94003509 bl 40032bec <strncmp>
400257cc: 35000100 cbnz w0, 400257ec <Untar_FromChunk_Print+0x14c>
400257d0: 91042321 add x1, x25, #0x108
400257d4: aa1903e0 mov x0, x25
400257d8: 97fffdc6 bl 40024ef0 <Untar_ProcessHeader.part.0>
if (retval != UNTAR_SUCCESSFUL) {
400257dc: 35000620 cbnz w0, 400258a0 <Untar_FromChunk_Print+0x200> <== NEVER TAKEN
if (context->base.linkflag == REGTYPE) {
400257e0: 39424320 ldrb w0, [x25, #144]
400257e4: 7100c01f cmp w0, #0x30
400257e8: 540003e0 b.eq 40025864 <Untar_FromChunk_Print+0x1c4> // b.none
context->done_bytes = 0;
400257ec: f901873f str xzr, [x25, #776]
400257f0: 17ffffd5 b 40025744 <Untar_FromChunk_Print+0xa4>
remaining = context->base.file_size - context->done_bytes;
400257f4: f9404333 ldr x19, [x25, #128]
write(context->out_fd, &buf[done], consume);
400257f8: 8b1b0281 add x1, x20, x27
remaining = context->base.file_size - context->done_bytes;
400257fc: f9418722 ldr x2, [x25, #776]
write(context->out_fd, &buf[done], consume);
40025800: b9431320 ldr w0, [x25, #784]
remaining = context->base.file_size - context->done_bytes;
40025804: cb020273 sub x19, x19, x2
consume = MIN(remaining, todo);
40025808: eb1a027f cmp x19, x26
4002580c: 9a9a9273 csel x19, x19, x26, ls // ls = plast
write(context->out_fd, &buf[done], consume);
40025810: aa1303e2 mov x2, x19
40025814: 97fff653 bl 40023160 <write>
context->done_bytes += consume;
40025818: f9418721 ldr x1, [x25, #776]
if (context->done_bytes == context->base.file_size) {
4002581c: f9404320 ldr x0, [x25, #128]
context->done_bytes += consume;
40025820: 8b010261 add x1, x19, x1
40025824: f9018721 str x1, [x25, #776]
if (context->done_bytes == context->base.file_size) {
40025828: eb00003f cmp x1, x0
4002582c: 54fff8c1 b.ne 40025744 <Untar_FromChunk_Print+0xa4> // b.any
close(context->out_fd);
40025830: b9431320 ldr w0, [x25, #784]
40025834: 97ffeeaf bl 400212f0 <close>
context->state = UNTAR_CHUNK_SKIP;
40025838: b9010737 str w23, [x25, #260]
context->base.file_size = 512 * context->base.nblocks
4002583c: a9480321 ldp x1, x0, [x25, #128]
context->done_bytes = 0;
40025840: f901873f str xzr, [x25, #776]
context->out_fd = -1;
40025844: b9031338 str w24, [x25, #784]
context->base.file_size = 512 * context->base.nblocks
40025848: d377d800 lsl x0, x0, #9
- context->base.file_size;
4002584c: cb010000 sub x0, x0, x1
context->base.file_size = 512 * context->base.nblocks
40025850: f9004320 str x0, [x25, #128]
40025854: 17ffffbc b 40025744 <Untar_FromChunk_Print+0xa4>
context->state = UNTAR_CHUNK_HEADER;
40025858: b901073f str wzr, [x25, #260]
context->done_bytes = 0;
4002585c: f901873f str xzr, [x25, #776]
40025860: 17ffffb9 b 40025744 <Untar_FromChunk_Print+0xa4>
context->out_fd = creat(context->base.file_path,
40025864: b9407b21 ldr w1, [x25, #120]
40025868: f9400320 ldr x0, [x25]
4002586c: 9400300c bl 4003189c <creat>
40025870: b9031320 str w0, [x25, #784]
if (context->out_fd >= 0) {
40025874: 37f800a0 tbnz w0, #31, 40025888 <Untar_FromChunk_Print+0x1e8> <== NEVER TAKEN
context->state = UNTAR_CHUNK_WRITE;
40025878: 52800040 mov w0, #0x2 // #2
4002587c: b9010720 str w0, [x25, #260]
context->done_bytes = 0;
40025880: f901873f str xzr, [x25, #776]
40025884: 17ffffb0 b 40025744 <Untar_FromChunk_Print+0xa4>
context->base.file_size = 512 * context->base.nblocks;
40025888: f9404720 ldr x0, [x25, #136] <== NOT EXECUTED
context->state = UNTAR_CHUNK_SKIP;
4002588c: b9010737 str w23, [x25, #260] <== NOT EXECUTED
context->done_bytes = 0;
40025890: f901873f str xzr, [x25, #776] <== NOT EXECUTED
context->base.file_size = 512 * context->base.nblocks;
40025894: d377d800 lsl x0, x0, #9 <== NOT EXECUTED
40025898: f9004320 str x0, [x25, #128] <== NOT EXECUTED
4002589c: 17ffffaa b 40025744 <Untar_FromChunk_Print+0xa4> <== NOT EXECUTED
context->state = UNTAR_CHUNK_ERROR;
400258a0: 52800061 mov w1, #0x3 // #3 <== NOT EXECUTED
400258a4: b9010721 str w1, [x25, #260] <== NOT EXECUTED
return retval;
400258a8: 17ffff97 b 40025704 <Untar_FromChunk_Print+0x64> <== NOT EXECUTED
return UNTAR_SUCCESSFUL;
400258ac: 52800000 mov w0, #0x0 // #0
}
400258b0: d65f03c0 ret
...
00000000400254d0 <Untar_FromFile_Print>:
{
400254d0: a9aa7bfd stp x29, x30, [sp, #-352]!
400254d4: 910003fd mov x29, sp
400254d8: a90153f3 stp x19, x20, [sp, #16]
400254dc: aa0103f3 mov x19, x1
if ((fd = open(tar_name, O_RDONLY)) < 0) {
400254e0: 52800001 mov w1, #0x0 // #0
400254e4: 97fff233 bl 40021db0 <open>
400254e8: 37f80a80 tbnz w0, #31, 40025638 <Untar_FromFile_Print+0x168> <== NEVER TAKEN
bufr = (char *)malloc(512);
400254ec: a9025bf5 stp x21, x22, [sp, #32]
400254f0: 2a0003f5 mov w21, w0
400254f4: d2804000 mov x0, #0x200 // #512
400254f8: 94000d3a bl 400289e0 <malloc>
400254fc: aa0003f4 mov x20, x0
if (bufr == NULL) {
40025500: b4000b40 cbz x0, 40025668 <Untar_FromFile_Print+0x198> <== NEVER TAKEN
if (strncmp(&bufr[257], "ustar", 5)) {
40025504: b00000d6 adrp x22, 4003e000 <tar01_tar_gz_size+0x3f8>
40025508: 913182d6 add x22, x22, #0xc60
ctx.file_path = buf;
4002550c: 910163e0 add x0, sp, #0x58
40025510: a90363f7 stp x23, x24, [sp, #48]
ctx->linkflag = -1;
40025514: 12800018 mov w24, #0xffffffff // #-1
ctx.file_name = buf;
40025518: a90c03e0 stp x0, x0, [sp, #192]
ctx.printer = printer;
4002551c: f900aff3 str x19, [sp, #344]
if (strncmp(&bufr[257], "ustar", 5)) {
40025520: 91040697 add x23, x20, #0x101
40025524: d503201f nop
if ((n = read(fd, bufr, 512)) != 512) {
40025528: aa1403e1 mov x1, x20
4002552c: 2a1503e0 mov w0, w21
40025530: d2804002 mov x2, #0x200 // #512
40025534: 97fff30f bl 40022170 <read>
if (strncmp(&bufr[257], "ustar", 5)) {
40025538: aa1603e1 mov x1, x22
if ((n = read(fd, bufr, 512)) != 512) {
4002553c: f108001f cmp x0, #0x200
40025540: 54000661 b.ne 4002560c <Untar_FromFile_Print+0x13c> // b.any
ctx->file_name[0] = '\0';
40025544: f94067e3 ldr x3, [sp, #200]
if (strncmp(&bufr[257], "ustar", 5)) {
40025548: d28000a2 mov x2, #0x5 // #5
4002554c: aa1703e0 mov x0, x23
ctx->file_name[0] = '\0';
40025550: 3900007f strb wzr, [x3]
ctx->nblocks = 0;
40025554: a9147fff stp xzr, xzr, [sp, #320]
ctx->linkflag = -1;
40025558: 390543f8 strb w24, [sp, #336]
if (strncmp(&bufr[257], "ustar", 5)) {
4002555c: 940035a4 bl 40032bec <strncmp>
40025560: aa1403e1 mov x1, x20
40025564: 2a0003e2 mov w2, w0
40025568: 910303e0 add x0, sp, #0xc0
4002556c: 35fffde2 cbnz w2, 40025528 <Untar_FromFile_Print+0x58>
40025570: 97fffe60 bl 40024ef0 <Untar_ProcessHeader.part.0>
if (ctx.linkflag == REGTYPE) {
40025574: 2a0003f3 mov w19, w0
if (retval != UNTAR_SUCCESSFUL)
40025578: 350004c0 cbnz w0, 40025610 <Untar_FromFile_Print+0x140> <== NEVER TAKEN
if (ctx.linkflag == REGTYPE) {
4002557c: 394543e0 ldrb w0, [sp, #336]
40025580: 7100c01f cmp w0, #0x30
40025584: 54fffd21 b.ne 40025528 <Untar_FromFile_Print+0x58> // b.any
if ((out_fd = creat(ctx.file_path, ctx.mode)) == -1) {
40025588: b9413be1 ldr w1, [sp, #312]
4002558c: f94063e0 ldr x0, [sp, #192]
40025590: f90023f9 str x25, [sp, #64]
40025594: 940030c2 bl 4003189c <creat>
40025598: 2a0003f9 mov w25, w0
4002559c: 3100041f cmn w0, #0x1
400255a0: 54000560 b.eq 4002564c <Untar_FromFile_Print+0x17c> // b.none <== NEVER TAKEN
for (i = 0; i < ctx.nblocks; i++) {
400255a4: f940a7e0 ldr x0, [sp, #328]
400255a8: d2800017 mov x23, #0x0 // #0
400255ac: d2800013 mov x19, #0x0 // #0
400255b0: b4000260 cbz x0, 400255fc <Untar_FromFile_Print+0x12c> <== NEVER TAKEN
400255b4: d503201f nop
n = read(fd, bufr, 512);
400255b8: aa1403e1 mov x1, x20
400255bc: d2804002 mov x2, #0x200 // #512
400255c0: 2a1503e0 mov w0, w21
400255c4: 97fff2eb bl 40022170 <read>
n = MIN(n, ctx.file_size - (i * 512UL));
400255c8: f940a3e3 ldr x3, [sp, #320]
n = read(fd, bufr, 512);
400255cc: aa0003e2 mov x2, x0
(void) write(out_fd, bufr, n);
400255d0: aa1403e1 mov x1, x20
400255d4: 2a1903e0 mov w0, w25
n = MIN(n, ctx.file_size - (i * 512UL));
400255d8: cb170063 sub x3, x3, x23
for (i = 0; i < ctx.nblocks; i++) {
400255dc: 91000673 add x19, x19, #0x1
n = MIN(n, ctx.file_size - (i * 512UL));
400255e0: eb02007f cmp x3, x2
400255e4: 910802f7 add x23, x23, #0x200
(void) write(out_fd, bufr, n);
400255e8: 9a829062 csel x2, x3, x2, ls // ls = plast
400255ec: 97fff6dd bl 40023160 <write>
for (i = 0; i < ctx.nblocks; i++) {
400255f0: f940a7e0 ldr x0, [sp, #328]
400255f4: eb13001f cmp x0, x19
400255f8: 54fffe08 b.hi 400255b8 <Untar_FromFile_Print+0xe8> // b.pmore <== NEVER TAKEN
close(out_fd);
400255fc: 2a1903e0 mov w0, w25
40025600: 97ffef3c bl 400212f0 <close>
40025604: f94023f9 ldr x25, [sp, #64]
40025608: 17ffffc6 b 40025520 <Untar_FromFile_Print+0x50>
4002560c: 52800013 mov w19, #0x0 // #0
free(bufr);
40025610: aa1403e0 mov x0, x20
40025614: 94000c37 bl 400286f0 <free>
close(fd);
40025618: 2a1503e0 mov w0, w21
4002561c: 97ffef35 bl 400212f0 <close>
return retval;
40025620: a9425bf5 ldp x21, x22, [sp, #32]
40025624: a94363f7 ldp x23, x24, [sp, #48]
}
40025628: 2a1303e0 mov w0, w19
4002562c: a94153f3 ldp x19, x20, [sp, #16]
40025630: a8d67bfd ldp x29, x30, [sp], #352
40025634: d65f03c0 ret
return UNTAR_FAIL;
40025638: 52800033 mov w19, #0x1 // #1 <== NOT EXECUTED
}
4002563c: 2a1303e0 mov w0, w19 <== NOT EXECUTED
40025640: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40025644: a8d67bfd ldp x29, x30, [sp], #352 <== NOT EXECUTED
40025648: d65f03c0 ret <== NOT EXECUTED
(void) lseek(fd, SEEK_CUR, 512UL * ctx.nblocks);
4002564c: f940a7e2 ldr x2, [sp, #328] <== NOT EXECUTED
40025650: 2a1503e0 mov w0, w21 <== NOT EXECUTED
40025654: d2800021 mov x1, #0x1 // #1 <== NOT EXECUTED
40025658: 53175842 lsl w2, w2, #9 <== NOT EXECUTED
4002565c: 97fff00d bl 40021690 <lseek> <== NOT EXECUTED
40025660: f94023f9 ldr x25, [sp, #64] <== NOT EXECUTED
40025664: 17ffffaf b 40025520 <Untar_FromFile_Print+0x50> <== NOT EXECUTED
close(fd);
40025668: 2a1503e0 mov w0, w21 <== NOT EXECUTED
return(UNTAR_FAIL);
4002566c: 52800033 mov w19, #0x1 // #1 <== NOT EXECUTED
close(fd);
40025670: 97ffef20 bl 400212f0 <close> <== NOT EXECUTED
return(UNTAR_FAIL);
40025674: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
40025678: 17ffffec b 40025628 <Untar_FromFile_Print+0x158> <== NOT EXECUTED
4002567c: 00000000 udf #0
0000000040025940 <Untar_FromGzChunk_Print>:
Untar_GzChunkContext *ctx,
void *chunk,
size_t chunk_size,
const rtems_printer *printer
)
{
40025940: a9bc7bfd stp x29, x30, [sp, #-64]!
40025944: 910003fd mov x29, sp
40025948: a90153f3 stp x19, x20, [sp, #16]
4002594c: aa0003f3 mov x19, x0
40025950: a9025bf5 stp x21, x22, [sp, #32]
/* Inflate until output buffer is not full */
do {
ctx->strm.next_out = (Bytef *) ctx->inflateBuffer;
ctx->strm.avail_out = ctx->inflateBufferSize;
status = inflate(&ctx->strm, Z_NO_FLUSH);
40025954: 910c6016 add x22, x0, #0x318
{
40025958: f9001bf7 str x23, [sp, #48]
4002595c: aa0303f7 mov x23, x3
ctx->strm.next_in = (Bytef *)chunk;
40025960: f9018c01 str x1, [x0, #792]
ctx->strm.avail_in = (size_t)chunk_size;
40025964: b9032002 str w2, [x0, #800]
40025968: 14000006 b 40025980 <Untar_FromGzChunk_Print+0x40>
}
} else {
untar_succesful = UNTAR_GZ_INFLATE_FAILED;
}
} while (ctx->strm.avail_out == 0 && ctx->strm.avail_in > 0
&& status == Z_OK);
4002596c: b9433a61 ldr w1, [x19, #824]
40025970: 350003c1 cbnz w1, 400259e8 <Untar_FromGzChunk_Print+0xa8>
} while (ctx->strm.avail_out == 0 && ctx->strm.avail_in > 0
40025974: b9432260 ldr w0, [x19, #800]
40025978: 34000380 cbz w0, 400259e8 <Untar_FromGzChunk_Print+0xa8>
&& status == Z_OK);
4002597c: 35000394 cbnz w20, 400259ec <Untar_FromGzChunk_Print+0xac> <== NEVER TAKEN
ctx->strm.next_out = (Bytef *) ctx->inflateBuffer;
40025980: f941c661 ldr x1, [x19, #904]
40025984: f9019a61 str x1, [x19, #816]
ctx->strm.avail_out = ctx->inflateBufferSize;
40025988: f941ca61 ldr x1, [x19, #912]
4002598c: b9033a61 str w1, [x19, #824]
status = inflate(&ctx->strm, Z_NO_FLUSH);
40025990: aa1603e0 mov x0, x22
40025994: 52800001 mov w1, #0x0 // #0
untar_succesful = UNTAR_GZ_INFLATE_FAILED;
40025998: 52800095 mov w21, #0x4 // #4
status = inflate(&ctx->strm, Z_NO_FLUSH);
4002599c: 94001bd9 bl 4002c900 <z_inflate>
400259a0: 2a0003f4 mov w20, w0
if (status == Z_OK || status == Z_STREAM_END) {
400259a4: 7100041f cmp w0, #0x1
400259a8: 54fffe28 b.hi 4002596c <Untar_FromGzChunk_Print+0x2c> // b.pmore <== NEVER TAKEN
untar_succesful = Untar_FromChunk_Print(&ctx->base,
400259ac: f941c661 ldr x1, [x19, #904]
400259b0: aa1303e0 mov x0, x19
size_t inflated_size =
400259b4: f941ca64 ldr x4, [x19, #912]
untar_succesful = Untar_FromChunk_Print(&ctx->base,
400259b8: d2800003 mov x3, #0x0 // #0
ctx->inflateBufferSize - ctx->strm.avail_out;
400259bc: b9433a62 ldr w2, [x19, #824]
untar_succesful = Untar_FromChunk_Print(&ctx->base,
400259c0: cb020082 sub x2, x4, x2
400259c4: 97ffff37 bl 400256a0 <Untar_FromChunk_Print>
400259c8: 2a0003f5 mov w21, w0
if (untar_succesful != UNTAR_SUCCESSFUL){
400259cc: 34fffd00 cbz w0, 4002596c <Untar_FromGzChunk_Print+0x2c> <== ALWAYS TAKEN
if (status != Z_OK) {
rtems_printf(printer, "Zlib inflate end failed\n");
}
}
return untar_succesful;
}
400259d0: 2a1503e0 mov w0, w21
400259d4: a94153f3 ldp x19, x20, [sp, #16]
400259d8: a9425bf5 ldp x21, x22, [sp, #32]
400259dc: f9401bf7 ldr x23, [sp, #48]
400259e0: a8c47bfd ldp x29, x30, [sp], #64
400259e4: d65f03c0 ret
if (status != Z_OK) {
400259e8: 34ffff54 cbz w20, 400259d0 <Untar_FromGzChunk_Print+0x90>
if (untar_succesful != UNTAR_SUCCESSFUL){
400259ec: 35000295 cbnz w21, 40025a3c <Untar_FromGzChunk_Print+0xfc> <== NEVER TAKEN
if (status != Z_STREAM_END) {
400259f0: 7100069f cmp w20, #0x1
400259f4: 540000a0 b.eq 40025a08 <Untar_FromGzChunk_Print+0xc8> // b.none <== ALWAYS TAKEN
rtems_printf(printer, "Zlib inflate failed\n");
400259f8: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
400259fc: 9132e021 add x1, x1, #0xcb8 <== NOT EXECUTED
40025a00: aa1703e0 mov x0, x23 <== NOT EXECUTED
40025a04: 94000c83 bl 40028c10 <rtems_printf> <== NOT EXECUTED
status = inflateEnd(&ctx->strm);
40025a08: aa1603e0 mov x0, x22
40025a0c: 94002181 bl 4002e010 <z_inflateEnd>
if (status != Z_OK) {
40025a10: 34fffe00 cbz w0, 400259d0 <Untar_FromGzChunk_Print+0x90> <== ALWAYS TAKEN
rtems_printf(printer, "Zlib inflate end failed\n");
40025a14: aa1703e0 mov x0, x23 <== NOT EXECUTED
40025a18: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
40025a1c: 91334021 add x1, x1, #0xcd0 <== NOT EXECUTED
40025a20: 94000c7c bl 40028c10 <rtems_printf> <== NOT EXECUTED
}
40025a24: 2a1503e0 mov w0, w21 <== NOT EXECUTED
40025a28: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
40025a2c: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
40025a30: f9401bf7 ldr x23, [sp, #48] <== NOT EXECUTED
40025a34: a8c47bfd ldp x29, x30, [sp], #64 <== NOT EXECUTED
40025a38: d65f03c0 ret <== NOT EXECUTED
rtems_printf(printer, "Untar not successful\n");
40025a3c: aa1703e0 mov x0, x23 <== NOT EXECUTED
40025a40: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
40025a44: 91328021 add x1, x1, #0xca0 <== NOT EXECUTED
40025a48: 94000c72 bl 40028c10 <rtems_printf> <== NOT EXECUTED
40025a4c: 17ffffe9 b 400259f0 <Untar_FromGzChunk_Print+0xb0> <== NOT EXECUTED
00000000400252e0 <Untar_FromMemory_Print>:
{
400252e0: a9a87bfd stp x29, x30, [sp, #-384]!
rtems_printf(printer, "untar: memory at %p (%zu)\n", tar_buf, size);
400252e4: aa0103e3 mov x3, x1
ctx.file_path = buf;
400252e8: 9101e3e4 add x4, sp, #0x78
{
400252ec: 910003fd mov x29, sp
400252f0: a9025bf5 stp x21, x22, [sp, #32]
400252f4: aa0003f5 mov x21, x0
400252f8: aa0103f6 mov x22, x1
400252fc: aa0203e0 mov x0, x2
rtems_printf(printer, "untar: memory at %p (%zu)\n", tar_buf, size);
40025300: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8>
40025304: 9131a021 add x1, x1, #0xc68
40025308: aa1503e2 mov x2, x21
{
4002530c: a90153f3 stp x19, x20, [sp, #16]
ptr = 0;
40025310: d2800013 mov x19, #0x0 // #0
{
40025314: a90363f7 stp x23, x24, [sp, #48]
if (strncmp(&bufr[257], "ustar", 5)) {
40025318: b00000d7 adrp x23, 4003e000 <tar01_tar_gz_size+0x3f8>
4002531c: 913182f7 add x23, x23, #0xc60
ctx->linkflag = -1;
40025320: 12800018 mov w24, #0xffffffff // #-1
{
40025324: a9046bf9 stp x25, x26, [sp, #64]
40025328: f90037e0 str x0, [sp, #104]
ctx.file_name = buf;
4002532c: a90e13e4 stp x4, x4, [sp, #224]
ctx.printer = printer;
40025330: f900bfe0 str x0, [sp, #376]
rtems_printf(printer, "untar: memory at %p (%zu)\n", tar_buf, size);
40025334: 94000e37 bl 40028c10 <rtems_printf>
if (ptr + 512 > size) {
40025338: 91080274 add x20, x19, #0x200
if (strncmp(&bufr[257], "ustar", 5)) {
4002533c: 91040660 add x0, x19, #0x101
if (ptr + 512 > size) {
40025340: eb16029f cmp x20, x22
40025344: 540008e8 b.hi 40025460 <Untar_FromMemory_Print+0x180> // b.pmore
ctx->file_name[0] = '\0';
40025348: f94077e3 ldr x3, [sp, #232]
4002534c: 8b1302ba add x26, x21, x19
if (strncmp(&bufr[257], "ustar", 5)) {
40025350: aa1703e1 mov x1, x23
40025354: d28000a2 mov x2, #0x5 // #5
40025358: 8b0002a0 add x0, x21, x0
ptr = 0;
4002535c: aa1403f3 mov x19, x20
ctx->file_name[0] = '\0';
40025360: 3900007f strb wzr, [x3]
ctx->nblocks = 0;
40025364: a9167fff stp xzr, xzr, [sp, #352]
ctx->linkflag = -1;
40025368: 3905c3f8 strb w24, [sp, #368]
if (strncmp(&bufr[257], "ustar", 5)) {
4002536c: 94003620 bl 40032bec <strncmp>
40025370: aa1a03e1 mov x1, x26
40025374: 2a0003e2 mov w2, w0
40025378: 910383e0 add x0, sp, #0xe0
4002537c: 35fffde2 cbnz w2, 40025338 <Untar_FromMemory_Print+0x58>
40025380: 97fffedc bl 40024ef0 <Untar_ProcessHeader.part.0>
if (retval != UNTAR_SUCCESSFUL)
40025384: 35000700 cbnz w0, 40025464 <Untar_FromMemory_Print+0x184> <== NEVER TAKEN
if (ctx.linkflag == REGTYPE) {
40025388: 3945c3e0 ldrb w0, [sp, #368]
4002538c: 7100c01f cmp w0, #0x30
40025390: 54fffd41 b.ne 40025338 <Untar_FromMemory_Print+0x58> // b.any
if ((fd = open(ctx.file_path,
40025394: f94073e0 ldr x0, [sp, #224]
40025398: 5280c021 mov w1, #0x601 // #1537
4002539c: f940afe2 ldr x2, [sp, #344]
400253a0: a90573fb stp x27, x28, [sp, #80]
400253a4: 97fff283 bl 40021db0 <open>
400253a8: 2a0003fc mov w28, w0
400253ac: 3100041f cmn w0, #0x1
400253b0: 54000660 b.eq 4002547c <Untar_FromMemory_Print+0x19c> // b.none <== NEVER TAKEN
for (i = 0; i < ctx.nblocks; i++) {
400253b4: a95603fa ldp x26, x0, [sp, #352]
400253b8: b4000880 cbz x0, 400254c8 <Untar_FromMemory_Print+0x1e8> <== NEVER TAKEN
400253bc: d2800019 mov x25, #0x0 // #0
400253c0: 14000005 b 400253d4 <Untar_FromMemory_Print+0xf4>
400253c4: f940b7e1 ldr x1, [sp, #360]
sizeToGo -= n;
400253c8: cb1b035a sub x26, x26, x27
for (i = 0; i < ctx.nblocks; i++) {
400253cc: eb19003f cmp x1, x25
400253d0: 540007c9 b.ls 400254c8 <Untar_FromMemory_Print+0x1e8> // b.plast <== ALWAYS TAKEN
len = ((sizeToGo < 512L) ? (sizeToGo) : (512L));
400253d4: f108035f cmp x26, #0x200
400253d8: d2804000 mov x0, #0x200 // #512
400253dc: 9a80935b csel x27, x26, x0, ls // ls = plast
n = write(fd, &tar_ptr[ptr], len);
400253e0: 8b1402a1 add x1, x21, x20
400253e4: aa1403f3 mov x19, x20
400253e8: aa1b03e2 mov x2, x27
400253ec: 2a1c03e0 mov w0, w28
for (i = 0; i < ctx.nblocks; i++) {
400253f0: 91000739 add x25, x25, #0x1
n = write(fd, &tar_ptr[ptr], len);
400253f4: 97fff75b bl 40023160 <write>
ptr += 512;
400253f8: 91080294 add x20, x20, #0x200
if (n != len) {
400253fc: eb00037f cmp x27, x0
40025400: 54fffe20 b.eq 400253c4 <Untar_FromMemory_Print+0xe4> // b.none <== ALWAYS TAKEN
Print_Error(printer, "write", ctx.file_path);
40025404: f94073f4 ldr x20, [sp, #224] <== NOT EXECUTED
message, path, errno, strerror(errno));
40025408: 9400312f bl 400318c4 <__errno> <== NOT EXECUTED
rtems_printf(printer, "untar: %s: %s: (%d) %s\n",
4002540c: b940001a ldr w26, [x0] <== NOT EXECUTED
message, path, errno, strerror(errno));
40025410: 9400312d bl 400318c4 <__errno> <== NOT EXECUTED
rtems_printf(printer, "untar: %s: %s: (%d) %s\n",
40025414: b9400000 ldr w0, [x0] <== NOT EXECUTED
40025418: 940035ad bl 40032acc <strerror> <== NOT EXECUTED
4002541c: aa0003e5 mov x5, x0 <== NOT EXECUTED
40025420: f94037e0 ldr x0, [sp, #104] <== NOT EXECUTED
40025424: b00000c2 adrp x2, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
40025428: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
4002542c: 2a1a03e4 mov w4, w26 <== NOT EXECUTED
40025430: aa1403e3 mov x3, x20 <== NOT EXECUTED
40025434: 91324042 add x2, x2, #0xc90 <== NOT EXECUTED
40025438: 912f4021 add x1, x1, #0xbd0 <== NOT EXECUTED
4002543c: 94000df5 bl 40028c10 <rtems_printf> <== NOT EXECUTED
close(fd);
40025440: 2a1c03e0 mov w0, w28
if (ptr + 512 > size) {
40025444: 91080274 add x20, x19, #0x200
close(fd);
40025448: 97ffefaa bl 400212f0 <close>
if (strncmp(&bufr[257], "ustar", 5)) {
4002544c: 91040660 add x0, x19, #0x101
if (ptr + 512 > size) {
40025450: eb16029f cmp x20, x22
40025454: a94573fb ldp x27, x28, [sp, #80]
40025458: 54fff789 b.ls 40025348 <Untar_FromMemory_Print+0x68> // b.plast <== ALWAYS TAKEN
4002545c: d503201f nop
retval = UNTAR_SUCCESSFUL;
40025460: 52800000 mov w0, #0x0 // #0
}
40025464: a94153f3 ldp x19, x20, [sp, #16]
40025468: a9425bf5 ldp x21, x22, [sp, #32]
4002546c: a94363f7 ldp x23, x24, [sp, #48]
40025470: a9446bf9 ldp x25, x26, [sp, #64]
40025474: a8d87bfd ldp x29, x30, [sp], #384
40025478: d65f03c0 ret
Print_Error(printer, "open", ctx.file_path);
4002547c: f94073f3 ldr x19, [sp, #224] <== NOT EXECUTED
message, path, errno, strerror(errno));
40025480: 94003111 bl 400318c4 <__errno> <== NOT EXECUTED
rtems_printf(printer, "untar: %s: %s: (%d) %s\n",
40025484: b940001a ldr w26, [x0] <== NOT EXECUTED
message, path, errno, strerror(errno));
40025488: 9400310f bl 400318c4 <__errno> <== NOT EXECUTED
rtems_printf(printer, "untar: %s: %s: (%d) %s\n",
4002548c: b9400000 ldr w0, [x0] <== NOT EXECUTED
40025490: 9400358f bl 40032acc <strerror> <== NOT EXECUTED
40025494: aa0003e5 mov x5, x0 <== NOT EXECUTED
40025498: f94037e0 ldr x0, [sp, #104] <== NOT EXECUTED
4002549c: aa1303e3 mov x3, x19 <== NOT EXECUTED
400254a0: 2a1a03e4 mov w4, w26 <== NOT EXECUTED
400254a4: b00000c2 adrp x2, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
400254a8: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
400254ac: 91322042 add x2, x2, #0xc88 <== NOT EXECUTED
400254b0: 912f4021 add x1, x1, #0xbd0 <== NOT EXECUTED
400254b4: 94000dd7 bl 40028c10 <rtems_printf> <== NOT EXECUTED
ptr += 512 * ctx.nblocks;
400254b8: f940b7f3 ldr x19, [sp, #360] <== NOT EXECUTED
400254bc: a94573fb ldp x27, x28, [sp, #80] <== NOT EXECUTED
400254c0: 8b132693 add x19, x20, x19, lsl #9 <== NOT EXECUTED
400254c4: 17ffff9d b 40025338 <Untar_FromMemory_Print+0x58> <== NOT EXECUTED
if (ptr + 512 > size) {
400254c8: aa1403f3 mov x19, x20
400254cc: 17ffffdd b 40025440 <Untar_FromMemory_Print+0x160>
0000000040024ef0 <Untar_ProcessHeader.part.0>:
return 0;
}
int
Untar_ProcessHeader(
40024ef0: a9b57bfd stp x29, x30, [sp, #-176]!
40024ef4: 91025022 add x2, x1, #0x94
40024ef8: 91027024 add x4, x1, #0x9c
40024efc: 910003fd mov x29, sp
40024f00: a90153f3 stp x19, x20, [sp, #16]
40024f04: aa0003f4 mov x20, x0
40024f08: a9025bf5 stp x21, x22, [sp, #32]
40024f0c: aa0103f5 mov x21, x1
num = 0;
40024f10: d2800001 mov x1, #0x0 // #0
40024f14: d503201f nop
if ((octascii[i] < '0') || (octascii[i] > '9')) {
40024f18: 38401440 ldrb w0, [x2], #1
40024f1c: 5100c000 sub w0, w0, #0x30
40024f20: 12001c03 and w3, w0, #0xff
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
40024f24: 93407c00 sxtw x0, w0
40024f28: 7100287f cmp w3, #0xa
40024f2c: 8b010c00 add x0, x0, x1, lsl #3
40024f30: 9a813001 csel x1, x0, x1, cc // cc = lo, ul, last
for (i=0; i < len; i++) {
40024f34: eb02009f cmp x4, x2
40024f38: 54ffff01 b.ne 40024f18 <Untar_ProcessHeader.part.0+0x28> // b.any
)
{
int i, sum;
sum = 0;
for (i=0; i<512; i++) {
40024f3c: d10006a5 sub x5, x21, #0x1
hdr_chksum = _rtems_octal2ulong(&bufr[148], 8);
40024f40: d2800022 mov x2, #0x1 // #1
sum = 0;
40024f44: 52800003 mov w3, #0x0 // #0
if ((i >= 148) && (i < 156))
40024f48: 51025444 sub w4, w2, #0x95
40024f4c: 71001c9f cmp w4, #0x7
40024f50: 54001c29 b.ls 400252d4 <Untar_ProcessHeader.part.0+0x3e4> // b.plast
sum += 0xff & ' ';
else
sum += 0xff & bufr[i];
40024f54: 386268a4 ldrb w4, [x5, x2]
for (i=0; i<512; i++) {
40024f58: f108005f cmp x2, #0x200
sum += 0xff & bufr[i];
40024f5c: 0b040063 add w3, w3, w4
for (i=0; i<512; i++) {
40024f60: 54000060 b.eq 40024f6c <Untar_ProcessHeader.part.0+0x7c> // b.none
40024f64: 91000442 add x2, x2, #0x1
40024f68: 17fffff8 b 40024f48 <Untar_ProcessHeader.part.0+0x58>
if (sum != hdr_chksum) {
40024f6c: 6b03003f cmp w1, w3
40024f70: 540012c1 b.ne 400251c8 <Untar_ProcessHeader.part.0+0x2d8> // b.any <== NEVER TAKEN
strlcpy(ctx->file_name, bufr, UNTAR_FILE_NAME_SIZE);
40024f74: f9400680 ldr x0, [x20, #8]
40024f78: aa1503e1 mov x1, x21
40024f7c: d2800c82 mov x2, #0x64 // #100
40024f80: a90363f7 stp x23, x24, [sp, #48]
40024f84: 940036dc bl 40032af4 <strlcpy>
ctx->mode = strtoul(&bufr[100], NULL, 8);
40024f88: 52800102 mov w2, #0x8 // #8
40024f8c: d2800001 mov x1, #0x0 // #0
40024f90: 910192a0 add x0, x21, #0x64
40024f94: 940037e2 bl 40032f1c <strtoul>
40024f98: f9003e80 str x0, [x20, #120]
ctx->linkflag = bufr[156];
40024f9c: 9101f2a2 add x2, x21, #0x7c
40024fa0: 910222a4 add x4, x21, #0x88
num = 0;
40024fa4: d2800001 mov x1, #0x0 // #0
ctx->linkflag = bufr[156];
40024fa8: 394272a5 ldrb w5, [x21, #156]
40024fac: 39024285 strb w5, [x20, #144]
if ((octascii[i] < '0') || (octascii[i] > '9')) {
40024fb0: 38401440 ldrb w0, [x2], #1
40024fb4: 5100c000 sub w0, w0, #0x30
40024fb8: 12001c03 and w3, w0, #0xff
num = num * 8 + ((unsigned long)(octascii[i] - '0'));
40024fbc: 93407c00 sxtw x0, w0
40024fc0: 7100287f cmp w3, #0xa
40024fc4: 8b010c00 add x0, x0, x1, lsl #3
40024fc8: 9a813001 csel x1, x0, x1, cc // cc = lo, ul, last
for (i=0; i < len; i++) {
40024fcc: eb02009f cmp x4, x2
40024fd0: 54ffff01 b.ne 40024fb0 <Untar_ProcessHeader.part.0+0xc0> // b.any
if (Make_Path(ctx->printer, ctx->file_path) != 0) {
40024fd4: f9400296 ldr x22, [x20]
ctx->file_size = _rtems_octal2ulong(&bufr[124], 12);
40024fd8: f9004281 str x1, [x20, #128]
if (Make_Path(ctx->printer, ctx->file_path) != 0) {
40024fdc: f9404e98 ldr x24, [x20, #152]
while (*path == '/') {
40024fe0: 394002c2 ldrb w2, [x22]
40024fe4: 7100bc5f cmp w2, #0x2f
40024fe8: 540000a1 b.ne 40024ffc <Untar_ProcessHeader.part.0+0x10c> // b.any <== ALWAYS TAKEN
40024fec: d503201f nop
40024ff0: 38401ec2 ldrb w2, [x22, #1]! <== NOT EXECUTED
40024ff4: 7100bc5f cmp w2, #0x2f <== NOT EXECUTED
40024ff8: 54ffffc0 b.eq 40024ff0 <Untar_ProcessHeader.part.0+0x100> // b.none<== NOT EXECUTED
if (p[0] == '\0') {
40024ffc: 34001682 cbz w2, 400252cc <Untar_ProcessHeader.part.0+0x3dc> <== NEVER TAKEN
40025000: aa1603f3 mov x19, x22
*p = '/';
40025004: 528005f7 mov w23, #0x2f // #47
40025008: 14000005 b 4002501c <Untar_ProcessHeader.part.0+0x12c>
if (p[0] == '\0') {
4002500c: 39400662 ldrb w2, [x19, #1]
*p = '/';
40025010: 39000277 strb w23, [x19]
for (; ; ++p) {
40025014: 91000673 add x19, x19, #0x1
if (p[0] == '\0') {
40025018: 34000902 cbz w2, 40025138 <Untar_ProcessHeader.part.0+0x248>
} else if (p[0] != '/') {
4002501c: 7100bc5f cmp w2, #0x2f
if (p[1] == '\0') {
40025020: 39400662 ldrb w2, [x19, #1]
} else if (p[0] != '/') {
40025024: 54ffff81 b.ne 40025014 <Untar_ProcessHeader.part.0+0x124> // b.any
*p = '\0';
40025028: 3900027f strb wzr, [x19]
if (p[1] == '\0') {
4002502c: 34000e22 cbz w2, 400251f0 <Untar_ProcessHeader.part.0+0x300> <== NEVER TAKEN
if (mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO) != 0) {
40025030: aa1603e0 mov x0, x22
40025034: 52803fe1 mov w1, #0x1ff // #511
40025038: 97fff1d2 bl 40021780 <mkdir>
4002503c: 34fffe80 cbz w0, 4002500c <Untar_ProcessHeader.part.0+0x11c>
if (errno == EEXIST || errno == EISDIR) {
40025040: 94003221 bl 400318c4 <__errno>
40025044: b9400000 ldr w0, [x0]
40025048: 7100441f cmp w0, #0x11
4002504c: 540000a0 b.eq 40025060 <Untar_ProcessHeader.part.0+0x170> // b.none<== ALWAYS TAKEN
40025050: 9400321d bl 400318c4 <__errno> <== NOT EXECUTED
40025054: b9400000 ldr w0, [x0] <== NOT EXECUTED
40025058: 7100541f cmp w0, #0x15 <== NOT EXECUTED
4002505c: 54fffd81 b.ne 4002500c <Untar_ProcessHeader.part.0+0x11c> // b.any <== NOT EXECUTED
if (stat(path, &sb) != 0) {
40025060: 910123e1 add x1, sp, #0x48
40025064: aa1603e0 mov x0, x22
40025068: 97fff48a bl 40022290 <stat>
4002506c: 35000340 cbnz w0, 400250d4 <Untar_ProcessHeader.part.0+0x1e4> <== NEVER TAKEN
if (!S_ISDIR(sb.st_mode)) {
40025070: b9405be0 ldr w0, [sp, #88]
40025074: 12140c00 and w0, w0, #0xf000
40025078: 7140101f cmp w0, #0x4, lsl #12
4002507c: 54fffc80 b.eq 4002500c <Untar_ProcessHeader.part.0+0x11c> // b.none<== ALWAYS TAKEN
if (unlink(path) != 0) {
40025080: aa1603e0 mov x0, x22 <== NOT EXECUTED
40025084: 9400103b bl 40029170 <unlink> <== NOT EXECUTED
40025088: 35001040 cbnz w0, 40025290 <Untar_ProcessHeader.part.0+0x3a0> <== NOT EXECUTED
if (mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO) != 0) {
4002508c: aa1603e0 mov x0, x22 <== NOT EXECUTED
40025090: 52803fe1 mov w1, #0x1ff // #511 <== NOT EXECUTED
40025094: 97fff1bb bl 40021780 <mkdir> <== NOT EXECUTED
40025098: 34fffba0 cbz w0, 4002500c <Untar_ProcessHeader.part.0+0x11c> <== NOT EXECUTED
message, path, errno, strerror(errno));
4002509c: 9400320a bl 400318c4 <__errno> <== NOT EXECUTED
rtems_printf(printer, "untar: %s: %s: (%d) %s\n",
400250a0: b9400013 ldr w19, [x0] <== NOT EXECUTED
message, path, errno, strerror(errno));
400250a4: 94003208 bl 400318c4 <__errno> <== NOT EXECUTED
rtems_printf(printer, "untar: %s: %s: (%d) %s\n",
400250a8: b9400000 ldr w0, [x0] <== NOT EXECUTED
400250ac: 94003688 bl 40032acc <strerror> <== NOT EXECUTED
400250b0: aa0003e5 mov x5, x0 <== NOT EXECUTED
400250b4: b00000c2 adrp x2, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
400250b8: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
400250bc: 2a1303e4 mov w4, w19 <== NOT EXECUTED
400250c0: aa1603e3 mov x3, x22 <== NOT EXECUTED
400250c4: aa1803e0 mov x0, x24 <== NOT EXECUTED
400250c8: 912fa042 add x2, x2, #0xbe8 <== NOT EXECUTED
400250cc: 912f4021 add x1, x1, #0xbd0 <== NOT EXECUTED
400250d0: 94000ed0 bl 40028c10 <rtems_printf> <== NOT EXECUTED
if (ctx->linkflag == SYMTYPE) {
400250d4: 39424285 ldrb w5, [x20, #144] <== NOT EXECUTED
retval = UNTAR_FAIL;
400250d8: 52800033 mov w19, #0x1 // #1 <== NOT EXECUTED
if (ctx->linkflag == SYMTYPE) {
400250dc: 7100c8bf cmp w5, #0x32 <== NOT EXECUTED
400250e0: 54000341 b.ne 40025148 <Untar_ProcessHeader.part.0+0x258> // b.any <== NOT EXECUTED
strlcpy(ctx->link_name, &bufr[157], sizeof(ctx->link_name));
400250e4: 91004280 add x0, x20, #0x10
400250e8: 910276a1 add x1, x21, #0x9d
400250ec: d2800c82 mov x2, #0x64 // #100
400250f0: aa0003f5 mov x21, x0
400250f4: 94003680 bl 40032af4 <strlcpy>
rtems_printf(ctx->printer, "untar: symlink: %s -> %s\n",
400250f8: f9400283 ldr x3, [x20]
400250fc: aa1503e2 mov x2, x21
40025100: f9404e80 ldr x0, [x20, #152]
40025104: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8>
40025108: 912fe021 add x1, x1, #0xbf8
4002510c: 94000ec1 bl 40028c10 <rtems_printf>
r = symlink(ctx->link_name, ctx->file_path);
40025110: f9400281 ldr x1, [x20]
40025114: aa1503e0 mov x0, x21
40025118: 94001002 bl 40029120 <symlink>
if (r != 0) {
4002511c: 35000940 cbnz w0, 40025244 <Untar_ProcessHeader.part.0+0x354> <== NEVER TAKEN
40025120: a94363f7 ldp x23, x24, [sp, #48]
}
40025124: 2a1303e0 mov w0, w19
40025128: a94153f3 ldp x19, x20, [sp, #16]
4002512c: a9425bf5 ldp x21, x22, [sp, #32]
40025130: a8cb7bfd ldp x29, x30, [sp], #176
40025134: d65f03c0 ret
if (ctx->linkflag == SYMTYPE) {
40025138: 39424285 ldrb w5, [x20, #144]
int retval = UNTAR_SUCCESSFUL;
4002513c: 52800013 mov w19, #0x0 // #0
if (ctx->linkflag == SYMTYPE) {
40025140: 7100c8bf cmp w5, #0x32
40025144: 54fffd00 b.eq 400250e4 <Untar_ProcessHeader.part.0+0x1f4> // b.none
} else if (ctx->linkflag == REGTYPE) {
40025148: 7100c0bf cmp w5, #0x30
4002514c: 540005c0 b.eq 40025204 <Untar_ProcessHeader.part.0+0x314> // b.none<== ALWAYS TAKEN
} else if (ctx->linkflag == DIRTYPE) {
40025150: 7100d4bf cmp w5, #0x35 <== NOT EXECUTED
40025154: 54fffe61 b.ne 40025120 <Untar_ProcessHeader.part.0+0x230> // b.any <== NOT EXECUTED
rtems_printf(ctx->printer, "untar: dir: %s\n", ctx->file_path);
40025158: f9400282 ldr x2, [x20] <== NOT EXECUTED
4002515c: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
40025160: 91312021 add x1, x1, #0xc48 <== NOT EXECUTED
40025164: f9404e80 ldr x0, [x20, #152] <== NOT EXECUTED
40025168: 94000eaa bl 40028c10 <rtems_printf> <== NOT EXECUTED
r = mkdir(ctx->file_path, ctx->mode);
4002516c: b9407a81 ldr w1, [x20, #120] <== NOT EXECUTED
40025170: f9400280 ldr x0, [x20] <== NOT EXECUTED
40025174: 97fff183 bl 40021780 <mkdir> <== NOT EXECUTED
if (r != 0) {
40025178: 34fffd40 cbz w0, 40025120 <Untar_ProcessHeader.part.0+0x230> <== NOT EXECUTED
Print_Error(ctx->printer, "mkdir", ctx->file_path);
4002517c: f9400295 ldr x21, [x20] <== NOT EXECUTED
retval = UNTAR_FAIL;
40025180: 52800033 mov w19, #0x1 // #1 <== NOT EXECUTED
Print_Error(ctx->printer, "mkdir", ctx->file_path);
40025184: f9404e94 ldr x20, [x20, #152] <== NOT EXECUTED
message, path, errno, strerror(errno));
40025188: 940031cf bl 400318c4 <__errno> <== NOT EXECUTED
rtems_printf(printer, "untar: %s: %s: (%d) %s\n",
4002518c: b9400016 ldr w22, [x0] <== NOT EXECUTED
message, path, errno, strerror(errno));
40025190: 940031cd bl 400318c4 <__errno> <== NOT EXECUTED
rtems_printf(printer, "untar: %s: %s: (%d) %s\n",
40025194: b9400000 ldr w0, [x0] <== NOT EXECUTED
40025198: 9400364d bl 40032acc <strerror> <== NOT EXECUTED
4002519c: aa0003e5 mov x5, x0 <== NOT EXECUTED
400251a0: 2a1603e4 mov w4, w22 <== NOT EXECUTED
400251a4: aa1503e3 mov x3, x21 <== NOT EXECUTED
400251a8: aa1403e0 mov x0, x20 <== NOT EXECUTED
400251ac: b00000c2 adrp x2, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
400251b0: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
400251b4: 91316042 add x2, x2, #0xc58 <== NOT EXECUTED
400251b8: 912f4021 add x1, x1, #0xbd0 <== NOT EXECUTED
400251bc: 94000e95 bl 40028c10 <rtems_printf> <== NOT EXECUTED
400251c0: a94363f7 ldp x23, x24, [sp, #48] <== NOT EXECUTED
}
400251c4: 17ffffd8 b 40025124 <Untar_ProcessHeader.part.0+0x234> <== NOT EXECUTED
rtems_printf(ctx->printer, "untar: file header checksum error\n");
400251c8: f9404e80 ldr x0, [x20, #152] <== NOT EXECUTED
return UNTAR_INVALID_CHECKSUM;
400251cc: 52800053 mov w19, #0x2 // #2 <== NOT EXECUTED
rtems_printf(ctx->printer, "untar: file header checksum error\n");
400251d0: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
400251d4: 912e8021 add x1, x1, #0xba0 <== NOT EXECUTED
400251d8: 94000e8e bl 40028c10 <rtems_printf> <== NOT EXECUTED
}
400251dc: 2a1303e0 mov w0, w19 <== NOT EXECUTED
400251e0: a94153f3 ldp x19, x20, [sp, #16] <== NOT EXECUTED
400251e4: a9425bf5 ldp x21, x22, [sp, #32] <== NOT EXECUTED
400251e8: a8cb7bfd ldp x29, x30, [sp], #176 <== NOT EXECUTED
400251ec: d65f03c0 ret <== NOT EXECUTED
unlink(path);
400251f0: aa1603e0 mov x0, x22 <== NOT EXECUTED
400251f4: 94000fdf bl 40029170 <unlink> <== NOT EXECUTED
if (ctx->linkflag == SYMTYPE) {
400251f8: 39424285 ldrb w5, [x20, #144] <== NOT EXECUTED
int retval = UNTAR_SUCCESSFUL;
400251fc: 52800013 mov w19, #0x0 // #0 <== NOT EXECUTED
40025200: 17ffffd0 b 40025140 <Untar_ProcessHeader.part.0+0x250> <== NOT EXECUTED
rtems_printf(ctx->printer, "untar: file: %s (s:%lu,m:%04lo)\n",
40025204: a9478e84 ldp x4, x3, [x20, #120]
40025208: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8>
4002520c: 91308021 add x1, x1, #0xc20
40025210: f9400282 ldr x2, [x20]
40025214: f9404e80 ldr x0, [x20, #152]
40025218: 94000e7e bl 40028c10 <rtems_printf>
ctx->nblocks = (((ctx->file_size) + 511) & ~511) / 512;
4002521c: f9404280 ldr x0, [x20, #128]
40025220: a94363f7 ldp x23, x24, [sp, #48]
40025224: 9107fc00 add x0, x0, #0x1ff
}
40025228: a9425bf5 ldp x21, x22, [sp, #32]
ctx->nblocks = (((ctx->file_size) + 511) & ~511) / 512;
4002522c: d349fc00 lsr x0, x0, #9
40025230: f9004680 str x0, [x20, #136]
}
40025234: 2a1303e0 mov w0, w19
40025238: a94153f3 ldp x19, x20, [sp, #16]
4002523c: a8cb7bfd ldp x29, x30, [sp], #176
40025240: d65f03c0 ret
Print_Error(ctx->printer, "symlink", ctx->file_path);
40025244: f9400295 ldr x21, [x20] <== NOT EXECUTED
retval = UNTAR_FAIL;
40025248: 52800033 mov w19, #0x1 // #1 <== NOT EXECUTED
Print_Error(ctx->printer, "symlink", ctx->file_path);
4002524c: f9404e94 ldr x20, [x20, #152] <== NOT EXECUTED
message, path, errno, strerror(errno));
40025250: 9400319d bl 400318c4 <__errno> <== NOT EXECUTED
rtems_printf(printer, "untar: %s: %s: (%d) %s\n",
40025254: b9400016 ldr w22, [x0] <== NOT EXECUTED
message, path, errno, strerror(errno));
40025258: 9400319b bl 400318c4 <__errno> <== NOT EXECUTED
rtems_printf(printer, "untar: %s: %s: (%d) %s\n",
4002525c: b9400000 ldr w0, [x0] <== NOT EXECUTED
40025260: 9400361b bl 40032acc <strerror> <== NOT EXECUTED
40025264: aa0003e5 mov x5, x0 <== NOT EXECUTED
40025268: 2a1603e4 mov w4, w22 <== NOT EXECUTED
4002526c: aa1503e3 mov x3, x21 <== NOT EXECUTED
40025270: aa1403e0 mov x0, x20 <== NOT EXECUTED
40025274: b00000c2 adrp x2, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
40025278: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
4002527c: 91306042 add x2, x2, #0xc18 <== NOT EXECUTED
40025280: 912f4021 add x1, x1, #0xbd0 <== NOT EXECUTED
40025284: 94000e63 bl 40028c10 <rtems_printf> <== NOT EXECUTED
}
40025288: a94363f7 ldp x23, x24, [sp, #48] <== NOT EXECUTED
4002528c: 17ffffa6 b 40025124 <Untar_ProcessHeader.part.0+0x234> <== NOT EXECUTED
message, path, errno, strerror(errno));
40025290: 9400318d bl 400318c4 <__errno> <== NOT EXECUTED
rtems_printf(printer, "untar: %s: %s: (%d) %s\n",
40025294: b9400013 ldr w19, [x0] <== NOT EXECUTED
message, path, errno, strerror(errno));
40025298: 9400318b bl 400318c4 <__errno> <== NOT EXECUTED
rtems_printf(printer, "untar: %s: %s: (%d) %s\n",
4002529c: b9400000 ldr w0, [x0] <== NOT EXECUTED
400252a0: 9400360b bl 40032acc <strerror> <== NOT EXECUTED
400252a4: aa0003e5 mov x5, x0 <== NOT EXECUTED
400252a8: 2a1303e4 mov w4, w19 <== NOT EXECUTED
400252ac: aa1603e3 mov x3, x22 <== NOT EXECUTED
400252b0: aa1803e0 mov x0, x24 <== NOT EXECUTED
400252b4: b00000c2 adrp x2, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
400252b8: b00000c1 adrp x1, 4003e000 <tar01_tar_gz_size+0x3f8> <== NOT EXECUTED
400252bc: 912f2042 add x2, x2, #0xbc8 <== NOT EXECUTED
400252c0: 912f4021 add x1, x1, #0xbd0 <== NOT EXECUTED
400252c4: 94000e53 bl 40028c10 <rtems_printf> <== NOT EXECUTED
}
400252c8: 17ffff83 b 400250d4 <Untar_ProcessHeader.part.0+0x1e4> <== NOT EXECUTED
int retval = UNTAR_SUCCESSFUL;
400252cc: 52800013 mov w19, #0x0 // #0 <== NOT EXECUTED
400252d0: 17ffff9c b 40025140 <Untar_ProcessHeader.part.0+0x250> <== NOT EXECUTED
sum += 0xff & ' ';
400252d4: 11008063 add w3, w3, #0x20
for (i=0; i<512; i++) {
400252d8: 91000442 add x2, x2, #0x1
400252dc: 17ffff1b b 40024f48 <Untar_ProcessHeader.part.0+0x58>