This is an archive of the discontinued LLVM Phabricator instance.

Force @{init,fini}_array if section name starts with ".{init,fini}_array.".
ClosedPublic

Authored by ruiu on Mar 22 2017, 12:51 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu created this revision.Mar 22 2017, 12:51 PM
ruiu updated this revision to Diff 92691.Mar 22 2017, 12:55 PM
  • Do not use template.
gsmolarczyk accepted this revision.Mar 22 2017, 3:43 PM
gsmolarczyk added a subscriber: gsmolarczyk.
gsmolarczyk added inline comments.
lld/ELF/InputSection.cpp
78 ↗(On Diff #92691)

SHT_INIT_ARRAY

88 ↗(On Diff #92691)

How about folding if (Type == SHT_PROGBITS) into outer if instruction?

This revision is now accepted and ready to land.Mar 22 2017, 3:43 PM
ruiu added inline comments.Mar 22 2017, 3:45 PM
lld/ELF/InputSection.cpp
78 ↗(On Diff #92691)

Fixed.

88 ↗(On Diff #92691)

I originally did this that way, but I changed that as I think this new code is slightly easier to read.

ruiu updated this revision to Diff 92727.Mar 22 2017, 3:45 PM
  • Fix typo.
gsmolarczyk added inline comments.Mar 22 2017, 3:47 PM
lld/ELF/InputSection.cpp
88 ↗(On Diff #92691)

You might be right. Ok with me either way.

This revision was automatically updated to reflect the committed changes.