You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed linker array sentinel on GCC, and added a test.
This change modifies the `UPB_LINKARR_DECLARE` macro to use inline assembly to create a weak anchor symbol within the linkarr section. This ensures that the `__start_linkarr_` and `__stop_linkarr_` symbols are always defined by the linker, even when no other objects are placed in that section. The previous sentinel mechanism was broken on GCC.
A new test, generated_registry_empty_test, is added to verify that the generated registry can be loaded successfully and is empty when no extensions are actually linked into the binary.
Also adds `upb_exttable_size` and `upb_ExtensionRegistry_Size` for testing purposes.
PiperOrigin-RevId: 904021133
0 commit comments