[go: up one dir, main page]

|
|
Log in / Subscribe / Register

Randomizing structure layout

Randomizing structure layout

Posted May 17, 2017 12:44 UTC (Wed) by nix (subscriber, #2304)
In reply to: Randomizing structure layout by johan
Parent article: Randomizing structure layout

Well, if it were built in to GCC and not a plugin this would actually be considered unacceptable: specifying -g should not change the generated code in any way (including disabling, say, structure randomization). What should happen, instead (and what I think does in fact happen) is that the generated debugging info correctly represents the structures' randomized field offsets in the DWARF. (DWARF does not require structure members to be represented in ascending order: indeed, they can be entirely overlapping -- this is how unions are represented -- or even partially overlapping, reversed, or, as here, in random order.)


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds