Skip to content

Upstreaming some archive / coff short import writing code? #591

@simonbuchan

Description

@simonbuchan

Howdy!

I've got some code for writing Windows dll import libraries in a PR over here: rust-lang/rustc_codegen_cranelift#1414 - some of it seems like it would be useful to upstream here, with some work to improve the UX, testing, and polishing.

In particular, it has:

  • GNU-flavor archive writing with some pretty raw code for both GNU and MSVC symbol tables.
    • I think it's probably in spitting distance of being byte-for-byte with MSVC lib.exe?
    • I've taken a look at the other flavors, and they don't seem too bad to add support for?
    • UX is something of a concern to get right, but I think I can make it a bit nicer than ar or ar_archive_writer's current public API.
    • Using ar_archive_writer might be a better path, given the much more heavily tested code.
  • Pointless reproduction of the write::coff code that I missed the existence of 😅 - though maybe there's still something salvageable there
  • Short import objects, even though they are pretty straightforward.

And even the overall goal of writing DLL import libs seems like it might be in scope?

I'd be happy to work to get these up to your standard if you're interested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions