This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Add support for naming wasm data segments
ClosedPublic

Authored by sbc100 on Sep 14 2017, 7:23 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Sep 14 2017, 7:23 PM
sbc100 updated this revision to Diff 115347.Sep 14 2017, 7:29 PM

fix test

sbc100 added a subscriber: llvm-commits.
sbc100 updated this revision to Diff 115488.Sep 15 2017, 2:10 PM
  • don't use const ArrayRef
  • fix test
sbc100 updated this revision to Diff 115489.Sep 15 2017, 2:13 PM
  • cleanup tests
dschuff edited edge metadata.Sep 15 2017, 3:24 PM

So are we going to say that the mere existence of segment names tells the linker it should merge them as though they were separate data sections? (or, is there any other possible use?) Is there other potential per-MCSection metadata we'd want that would make this metadata end up more generic?

Yes, there is the potential that we might need more metadata down the road (type, flags, etc) but right now I think name is enough for to get init_array and fini_array working.

WRT to merging I plan to follow the same rules as the ELF version of lld. I'm hoping that name will be enough for me to do this, but I guess I might need type/flags down the road. However this change should be enough to get init_array / fini_array working which is my immediate goal.

sbc100 updated this revision to Diff 115693.Sep 18 2017, 11:37 AM
  • add bss test case
dschuff accepted this revision.Sep 19 2017, 1:09 PM
This revision is now accepted and ready to land.Sep 19 2017, 1:09 PM
This revision was automatically updated to reflect the committed changes.