https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116457
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Arsen Arsenović from comment #8) > > what happens if you have 2 structs marked as randomize_layout but the order > > of the definition is different between 2 TUs? Then this breaks unless you > > only have them not going outside the TU. This part was never answered on the semantics here? And the clang documentation for frandomize-layout-seed/frandomize-layout-seed-file is weak. Say you have (assuming all three have the randomize attribute on it) header1: ``` struct a { ... }; ``` header2: ``` struct b { ... }; ``` You include header1 before header2 in TU1 but in TU2 the opposite is true. Or say you sometimes include header3 which contains `struct c{...};` how do you set the seed for each struct? This is not documented at all. The documentation for these 2 options in clang just say: "File holding the seed used by the randomize structure layout feature" Nothing more. The attribute randomize_layout is not even documented either.