This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Emit .llvmcmd and .llvmbc as custom sections
ClosedPublic

Authored by sbc100 on Mar 30 2020, 10:20 PM.

Diff Detail

Event Timeline

sbc100 created this revision.Mar 30 2020, 10:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2020, 10:20 PM

Seems reasonable to me! In my testing though if these existed as custom sections they'd still make their way to the final binary through LLD, so could LLD skip over these sectiosn by default?

Seems reasonable to me! In my testing though if these existed as custom sections they'd still make their way to the final binary through LLD, so could LLD skip over these sectiosn by default?

I'll take a look at that.

Can you confirm that you tools are able to find and use the sections in the same way they do for ELF files?

sbc100 updated this revision to Diff 253935.Mar 31 2020, 11:19 AM

strip in linker

alexcrichton accepted this revision.Mar 31 2020, 11:32 AM

At least from my POV looks good :)

Thanks for the quick patch!

Should this link also be updated to handle the special section names?

This revision is now accepted and ready to land.Mar 31 2020, 11:32 AM
sbc100 updated this revision to Diff 253941.Mar 31 2020, 11:41 AM

Avoid resuing IsUsedInReloc

This revision was automatically updated to reflect the committed changes.