[llvm-dev] Support of Big archive (AIX archive)
Jordan Rupprecht via llvm-dev
llvm-dev at lists.llvm.org
Mon Apr 12 14:57:20 PDT 2021
Haven't heard of this archive format, but the documentation linked seems
straightforward, thanks. Seems like a useful addition to LLVM tools. I'd be
willing to review/help out with some patches here.
Conceptually, it seems like the current archive parsing logic could be
adapted for this format. But as you note, it will take some refactoring, as
the current code assumes GNU/BSD/COFF variants of the standard ar file
format.
The first thing I'd probably start with is seeing if it makes sense to have
ArchiveMemberHeader be an abstract class, with subclasses for the standard
ar file format, and one for AIX w/ the different header struct. I'd also
*not* try to force the fixed-length header format to fit
in ArchiveMemberHeader, but make that parsed just once during archive
initialization -- it doesn't seem to fit the idiom very well.
On Mon, Apr 12, 2021 at 3:43 PM David Blaikie <dblaikie at gmail.com> wrote:
> +Fangrui Song +James Henderson +Jordan Rupprecht
>
> Can't say I know too much about the architecture here, but perhaps
> these folks have some ideas.
>
> On Thu, Apr 1, 2021 at 1:02 AM GUESNET, ETIENNE via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> >
> > Hello,
> >
> > I implement support of AIX archive (big archive / XCOFF) on LLVM.
> >
> > I have done a prototype available here :
> https://github.com/EGuesnet/llvm-project/commit/1db5ddbdfea5614d0b91a8a6a1920ac630163ec0
> .
> >
> > This prototype replaces support of GNU/BSD/... archive by big archive,
> but you can switch changing the include. I have implemented only read
> operation (t, x, p).
> >
> >
> >
> > I want advices, especially to merge correctly support of Big archive and
> other archive. Main troubles to merge is big archive has a different header
> than other archive.
> >
> > Moreover, big archives have a fix length header, and one header for each
> object; fix and object headers are different (they are the same structure
> for non-big archive). Big archives have member table and symbol table at
> the end of the archive, so you must stop to read it before the end; the
> location of these table are given with absolute offset, hard to take into
> account in current code.
> >
> >
> >
> > Big archive documentation is here :
> https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/filesreference/ar_big.html
> .
> >
> >
> >
> > Thanks.
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210412/bcb1ff84/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4002 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210412/bcb1ff84/attachment-0001.bin>
More information about the llvm-dev
mailing list