Discard .group sections in fips_shared.lds After https://boringssl-review.googlesource.com/c/boringssl/+/96527, we fixed a typo that caused C++ inline functions to not end up in the hashed region. C++ `inline` symbols go in dedicated sections in COMDAT section groups. When we merged these sections above, we retained the .group section. Otherwise, LLD seems to place .text in the COMDAT group. Counter this by just dropping all .group sections. Bug: 537726817 Change-Id: I7f93c556e965869f52120c69f319c54ad3c55ad8 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/100407 Auto-Submit: David Benjamin <davidben@google.com> Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/fipsmodule/fips_shared.lds b/crypto/fipsmodule/fips_shared.lds index cffbcd3..a2b1dd4 100644 --- a/crypto/fipsmodule/fips_shared.lds +++ b/crypto/fipsmodule/fips_shared.lds
@@ -5,7 +5,7 @@ *(.text) *(.text.unlikely.*) /* C++ `inline` symbols are normally placed in their own sections to be - * deduplicated. Undo this. */ + * deduplicated. Undo this. See also .group handling above. */ *(.text.*) PROVIDE_HIDDEN(BORINGSSL_bcm_text_end = .); } @@ -47,5 +47,10 @@ *(.rel.ro) *(.rela.ro) *(*.data.*) + /* Drop section groups. C++ `inline` symbols go in dedicated sections in + * COMDAT section groups. When we merge these sections above, drop the + * COMDAT grouping. Otherwise the linker seems to place .text in the group. + * See b/537726817. */ + *(.group) } }