HomePhabricator

Align SHT_NOBITS sections is they are the first on a PT_LOAD.
Audit RequiredrL321657

Description

Align SHT_NOBITS sections is they are the first on a PT_LOAD.

We normally want to ignore SHT_NOBITS sections when computing
offsets. The sh_offset of section itself seems to be irrelevant and

  • If the section is in the middle of a PT_LOAD, it will make no difference on the computed offset of the followup section.
  • If it is in the end of a PT_LOAD, we want to avoid its alignment changing the offset of the followup sections.

The issue is if it is at the start of the PT_LOAD. In that case we do
have to align it so that the following sections have congruent address
and offset module the page size. We were not handling this case.

This should fix freebsd kernel link.

Details

Auditors
Bigcheese
Committed
rafaelJan 2 2018, 8:46 AM
Parents
rL321656: [x86] allow pairs of PCMPEQ for vector-sized integer equality comparisons…
Branches
Unknown
Tags
Unknown