This is an archive of the discontinued LLVM Phabricator instance.

[ELF2] .shstrtab section implemented
ClosedPublic

Authored by grimar on Oct 20 2015, 9:54 AM.

Details

Summary

The section header table index of the entry that is associated with the section name string table.

This looks to be prerequisite for --strip-all I am currently working on.
It will remove the StrTab from output, but we still need assign something to EHdr->e_shstrndx (currently index of StrTab is assigned, patch changes that) and that something is an index of .shstrtab.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 37892.Oct 20 2015, 9:54 AM
grimar retitled this revision from to [ELF2] .shstrtab section implemented.
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.
ruiu accepted this revision.Oct 20 2015, 10:03 AM
ruiu edited edge metadata.

LGTM. Pretty straightforward, nice.

This revision is now accepted and ready to land.Oct 20 2015, 10:03 AM
davide accepted this revision.Oct 20 2015, 10:05 AM
davide added a reviewer: davide.
davide added a subscriber: davide.

Looks good to me modulo one test.

test/elf2/basic-mips.s
4 ↗(On Diff #37892)

what's this?

Oh yes, sorry, I am talking right about it !


От: davide.italiano@gmail.com [davide.italiano@gmail.com] от имени Davide Italiano [davide@freebsd.org]
Отправлено: 20 октября 2015 г. 21:01
Кому: reviews+D13904+public+03561865476a15e1@reviews.llvm.org; George Rimar
Копия: Rui Ueyama; Rafael Ávila de Espíndola; llvm-commits
Тема: Re: [PATCH] D13904: [ELF2] .shstrtab section implemented

davide added inline comments.Oct 20 2015, 10:11 AM
test/elf2/basic.s
192 ↗(On Diff #37892)

Also this newline can be avoided.

grimar updated this object.Oct 20 2015, 10:11 AM
grimar edited edge metadata.
grimar added inline comments.Oct 20 2015, 10:14 AM
test/elf2/basic-mips.s
4 ↗(On Diff #37892)

Oops. Will fix before commit.

test/elf2/basic.s
192 ↗(On Diff #37892)

Will fix.

ruiu added a comment.Oct 20 2015, 10:21 AM

Also please verify that the patch does not contain trailing whitespace. (I don't know if that exists in this patch, but your previous patch contained that.) If you are using git, the easiest way is to run 'git show' before submission, as the command highlights trailing whitespace.

This revision was automatically updated to reflect the committed changes.
In D13904#271253, @ruiu wrote:

Also please verify that the patch does not contain trailing whitespace. (I don't know if that exists in this patch, but your previous patch contained that.) If you are using git, the easiest way is to run 'git show' before submission, as the command highlights trailing whitespace.

I noticed your message too late. Actually I am using svn, but I had installed plugin for MSVS that keeps unix endlines in code, so I hope everything should be fine here.

От: davide.italiano@gmail.com [davide.italiano@gmail.com] от имени Davide Italiano [davide@freebsd.org]
Отправлено: 20 октября 2015 г. 21:21
Кому: reviews+D13904+public+03561865476a15e1@reviews.llvm.org; George Rimar
Копия: Rafael Ávila de Espíndola; Davide Italiano; Rui Ueyama; llvm-commits
Тема: Re: [PATCH] D13904: [ELF2] .shstrtab section implemented

Yes, that is my primary dev tool.
I am using qtcreator and ubuntu virtual machine only for self-hosting tests and to have access to gnu tools when needed.
It works for me.


От: Rui Ueyama [ruiu@google.com]
Отправлено: 20 октября 2015 г. 21:41
Кому: reviews+D13904+public+03561865476a15e1@reviews.llvm.org
Копия: George Rimar; Rafael Ávila de Espíndola; Davide Italiano; llvm-commits
Тема: Re: [PATCH] D13904: [ELF2] .shstrtab section implemented