Page MenuHomePhabricator

[NFCI][XCOFF][AIX] Skip empty Section during object file generation

Authored by jasonliu on Oct 25 2019, 1:13 PM.



This is a fix to D69112 where we common up the logic of writing CsectGroup.
However, we forget to skip the Sections that are empty in that patch.

Diff Detail

Event Timeline

jasonliu created this revision.Oct 25 2019, 1:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2019, 1:13 PM
jasonliu updated this revision to Diff 226497.Oct 25 2019, 1:58 PM
daltenty added inline comments.Oct 25 2019, 2:10 PM

Should this be uint16_t?

jasonliu updated this revision to Diff 226541.Oct 26 2019, 9:37 AM

Change SectionCount type to unsigned.

jasonliu marked an inline comment as done.Oct 26 2019, 9:43 AM
jasonliu added inline comments.

Originally choose the signed type at the mind set of "don't use unsigned to represent integer that could not be negative." And also, want this to be the same type as the Maximum section index could be.
But just find out that we are actually writing this SectionCount as unsigned in the object file. So I figure I will just avoid the controversy and use unsigned instead.

This revision is now accepted and ready to land.Oct 28 2019, 7:03 AM
xingxue accepted this revision.Oct 28 2019, 7:12 AM


This revision was automatically updated to reflect the committed changes.