History

gcc-plugins/stackleak: Avoid .head.text section

The .head.text section carries the startup code that runs with the MMU off or with a translation of memory that deviates from the ordinary one. So avoid instrumentation with the stackleak plugin, which already avoids .init.text and .noinstr.text entirely.

Ard Biesheuvel committed 2 years ago

Commit e7d24c01 parent 39cd87c1 file · +2 −0Browse files

Unified · Split

scripts/gcc-plugins/stackleak_plugin.c+2−0
@@ -467,6 +467,8 @@ static bool stackleak_gate(void) · 466 unmodified lines
467 return false;467 return false;
468 if (STRING_EQUAL(section, ".entry.text"))468 if (STRING_EQUAL(section, ".entry.text"))
469 return false;469 return false;
470 if (STRING_EQUAL(section, ".head.text"))
471 return false;
470 }472 }
471 473
472 return track_frame_size >= 0;474 return track_frame_size >= 0;