On 1/31/26 8:11 PM, H.J. Lu wrote:
Change in the v8 patch:

1.  __stack_chk_guard must be an uintptr_t variable.
2.  Remove c_stack_protect_guard_decl_p and
duplicate_stack_protect_guard_decl_p.

Thanks.

@@ -926,7 +926,7 @@ default_stack_protect_guard (void)
t = build_decl (UNKNOWN_LOCATION,
                      VAR_DECL, get_identifier ("__stack_chk_guard"),
-                     ptr_type_node);
+                     lang_hooks.types.type_for_mode (ptr_mode, 1));

Should this change be conditional on targetm.stack_protect_guard_symbol_p ()?

+  /* Define this to indicate that the stack protection guard symbol,
+     "__stack_chk_guard", is an internal symbol.  */
+  if (targetm.stack_protect_guard_symbol_p ())
+    cpp_define (pfile, "__stack_protection_guard_is_internal_symbol__");

Why "internal"? I read "internal" as internal linkage, i.e. "static", and in the testcases the symbols all have external linkage, and it's based on TARGET_SSP_GLOBAL_GUARD.

Maybe the macro should be something like __stack_protection_guard_declared__?

Jason

Reply via email to