Skip to content

Fill between executable sections with trap instructions #31575

Closed
@rui314

Description

@rui314
Bugzilla Link 32227
Resolution FIXED
Resolved on Apr 07, 2017 05:27
Version unspecified
OS All
CC @emaste,@jh7370

Extended Description

Currently, LLD leaves padding between executable sections as-is, so they are 0. That is not desirable for a few reasons.

  1. Disassemblers would interpret the sequences of 0 bytes at end of each function as machine instructions and print out bogus disassembly.

  2. Leaving executable 0 bytes could potentially make some attack easier.

We want to fill gaps with trap instructions. On x86 and x86-64, that is 0xcc, for example.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions