2020-06-16 13:38:43 +00:00
|
|
|
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
|
2020-06-15 14:18:57 +00:00
|
|
|
│vi: set et ft=asm ts=8 tw=8 fenc=utf-8 :vi│
|
|
|
|
╞══════════════════════════════════════════════════════════════════════════════╡
|
|
|
|
│ Copyright 2020 Justine Alexandra Roberts Tunney │
|
|
|
|
│ │
|
2020-12-28 01:18:44 +00:00
|
|
|
│ Permission to use, copy, modify, and/or distribute this software for │
|
|
|
|
│ any purpose with or without fee is hereby granted, provided that the │
|
|
|
|
│ above copyright notice and this permission notice appear in all copies. │
|
2020-06-15 14:18:57 +00:00
|
|
|
│ │
|
2020-12-28 01:18:44 +00:00
|
|
|
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL │
|
|
|
|
│ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED │
|
|
|
|
│ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE │
|
|
|
|
│ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL │
|
|
|
|
│ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR │
|
|
|
|
│ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER │
|
|
|
|
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
|
|
|
│ PERFORMANCE OF THIS SOFTWARE. │
|
2020-06-15 14:18:57 +00:00
|
|
|
╚─────────────────────────────────────────────────────────────────────────────*/
|
2021-03-01 07:42:35 +00:00
|
|
|
#include "libc/macros.internal.h"
|
2020-08-25 11:23:25 +00:00
|
|
|
#include "ape/relocations.h"
|
|
|
|
#include "libc/zip.h"
|
2020-06-15 14:18:57 +00:00
|
|
|
|
2021-02-08 17:19:00 +00:00
|
|
|
// ZIP Central Directory.
|
2021-02-28 02:02:32 +00:00
|
|
|
.section .zip.3,"",@progbits
|
2020-08-25 11:23:25 +00:00
|
|
|
.hidden __zip_start
|
|
|
|
.globl __zip_start
|
|
|
|
.type __zip_start,@object
|
2020-06-15 14:18:57 +00:00
|
|
|
__zip_start:
|
2020-08-25 11:23:25 +00:00
|
|
|
.previous/*
|
|
|
|
...
|
|
|
|
decentralized content
|
|
|
|
...
|
2021-02-28 02:02:32 +00:00
|
|
|
*/.section .zip.5,"",@progbits
|
2020-06-15 14:18:57 +00:00
|
|
|
__zip_end:
|
2020-08-25 11:23:25 +00:00
|
|
|
.long kZipCdirHdrMagic # magic
|
|
|
|
.short 0 # disk
|
|
|
|
.short 0 # starting disk
|
2021-03-01 14:24:11 +00:00
|
|
|
.short v_zip_records # number of records on disk
|
2020-08-25 11:23:25 +00:00
|
|
|
.short v_zip_records # records
|
|
|
|
.long v_zip_cdirsize # size of central directory
|
|
|
|
.long RVA(__zip_start) # central directory offset
|
|
|
|
.short v_zip_commentsize # comment size
|
|
|
|
.endobj __zip_end,globl,hidden
|
|
|
|
.weak v_zip_records
|
|
|
|
.weak v_zip_cdirsize
|
|
|
|
.weak v_zip_commentsize
|
|
|
|
.previous
|