about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-06-06 19:11:17 +0900
committerGitHub <noreply@github.com>2021-06-06 19:11:17 +0900
commitd69cd467618f69f4427f001b0a6a581e6375fd4c (patch)
treea85f27260a89514483fa3b1f822df1fb4a26df00 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
parentb3bcf4af747addb6af2fd031881c604435513c9e (diff)
parentcffef3385d33316344895db14016d55989e3649b (diff)
downloadrust-d69cd467618f69f4427f001b0a6a581e6375fd4c.tar.gz
rust-d69cd467618f69f4427f001b0a6a581e6375fd4c.zip
Rollup merge of #85772 - luqmana:ignored-metadata, r=petrochenkov
Preserve metadata w/ Solaris-like linkers.

#84468 moved the `-zignore` linker flag from the `gc_sections` method to `add_as_needed` which is more accurate but Solaris-style linkers will also end up removing an unreferenced ELF sections [1]. This had the unfortunate side effect of causing the `.rustc` section (which has the metada) to be removed which could cause issues when trying to link against the resulting crates or use proc macros.

Since the `-zignore` is positional, we fix this by moving the metadata objects to before the flag.

[1] Specifically a section is considered unreferenced if:
* The section is allocatable
* No other sections bind to (relocate) to this section
* The section provides no global symbols

https://docs.oracle.com/cd/E19683-01/817-3677/6mj8mbtbs/index.html#chapter4-19
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs')
0 files changed, 0 insertions, 0 deletions