This is an archive of the discontinued LLVM Phabricator instance.

[ELF] SHF_MERGE section with 0 entsize is not fatal
ClosedPublic

Authored by emaste on Mar 16 2016, 2:02 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

emaste updated this revision to Diff 50870.Mar 16 2016, 2:02 PM
emaste retitled this revision from to [ELF] SHF_MERGE section with 0 entsize is not fatal.
emaste updated this object.
emaste added reviewers: grimar, ruiu.
emaste added a subscriber: davide.
emaste added inline comments.Mar 16 2016, 2:06 PM
test/ELF/merge-zero-size.s
1 ↗(On Diff #50870)

It looks like llvm-mc will not allow me to generate a section with sh_entsize 0 so using the existing ELF object seems reasonable. Perhaps I should rename it to merge-shentsize-zero.elf though, and this test file needs to be renamed with a .test extension instead of .s.

grimar edited edge metadata.Mar 16 2016, 2:06 PM

That is LGTM. Lets see what Rui think.

ruiu edited edge metadata.Mar 16 2016, 2:09 PM
ruiu added a subscriber: ruiu.

LGTM

grimar added inline comments.Mar 16 2016, 2:10 PM
test/ELF/merge-zero-size.s
1 ↗(On Diff #50870)

Agree with rename to merge-shentsize-zero.elf. Don't see reasons to rename to .test instead of .s though.

emaste added inline comments.Mar 16 2016, 2:13 PM
test/ELF/merge-zero-size.s
1 ↗(On Diff #50870)

because the existing .s tests are assembly source and invoke llvm-mc (with two exceptions), and the .test tests act on existing objects etc.

grimar added inline comments.Mar 16 2016, 2:16 PM
test/ELF/merge-zero-size.s
1 ↗(On Diff #50870)

Not sure such rule exist. For example llvm33-rela-outside-group.s uses llvm33-rela-outside-group.o

This revision was automatically updated to reflect the committed changes.
emaste added inline comments.Mar 16 2016, 2:19 PM
test/ELF/merge-zero-size.s
1 ↗(On Diff #50870)

Ok, but it still contains asm source code. The test file I moved it out of is named invalid-elf.test. Anyway, I don't think it matters and is now committed.