[AIX] add -bdbg:namedsects:ss link arg#156159
[AIX] add -bdbg:namedsects:ss link arg#156159daltenty wants to merge 1 commit intorust-lang:mainfrom
Conversation
On AIX, PGO runtimes and ifunc support requires the named section linker feature which collects the name sections together and generates start/stop symbols for them. This change adds the option to the default linker args for the target.
|
These commits modify compiler targets. |
|
r? @tiif rustbot has assigned @tiif. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
I see no significant reason to not simply r+ this aside from "is there any meaningful negative effect on linked executables and libraries when you're not doing PGO?" This is just a small per-section binary size overhead, right? And ifuncs? Defining new ifuncs, calling them, or both? Happy to sign off on it either way if I understand correctly, just want to make sure I actually do. |
That's a great question, I ran this past our linker experts. The option itself creates no extra cost on the binary as it only has an effect on the layout of existing data in the binary. It causes the linker to layout existing data in the name sections1 in the binary (if they exist) contiguously in memory and fills in the address of stop/start pointers to those sections (again if they exist). This is done because the PGO and ifunc runtimes need to walk this global data during program startup in their initializers, so they need them to be contiguous. If you use PGO or ifuncs when building your program on AIX, you have this data already (and you pay the cost of the extra initializers on program startup). If you don't, there's no extra cost. Footnotes
|
|
Cool, thanks for explaining that! It sounds like the difference if any is even more marginal than I first thought it was and would only occur due to padding-to-alignment types of things. @bors r+ |
…kingjubilee [AIX] add -bdbg:namedsects:ss link arg On AIX, the PGO runtime and ifunc runtime support requires the named section linker feature which collects the name sections together and generates start/stop symbols for them. This change adds the option to the default linker args for the target.
Rollup of 12 pull requests Successful merges: - #155341 (generic_const_args: allow paths to non type consts) - #156062 (Added command-line argument support for `wasm32-wali-linux-musl`) - #156159 ([AIX] add -bdbg:namedsects:ss link arg) - #156174 (Wasm: remove implicit `__heap_base`/`__data_end` exports) - #156186 (fix: remap ci-llvm debug paths via `-ffile-prefix-map`) - #156193 (port `rustc_ast*` crates from `box_` to `deref_patterns`) - #156201 (Don't run ui-fulldeps tests twice in stage 1) - #155808 (Always use `ConstFn` context for `const` closures) - #156105 (interpret: correctly deal with repr(transparent) enums) - #156148 (Use `all_impls` instead of handrolling it) - #156156 (Adjust getMCSubtargetInfo signature for LLVM 23+) - #156205 (move generalization test)
…kingjubilee [AIX] add -bdbg:namedsects:ss link arg On AIX, the PGO runtime and ifunc runtime support requires the named section linker feature which collects the name sections together and generates start/stop symbols for them. This change adds the option to the default linker args for the target.
Rollup of 15 pull requests Successful merges: - #151122 (fix: more descriptive error message for enum to integer) - #155341 (generic_const_args: allow paths to non type consts) - #156062 (Added command-line argument support for `wasm32-wali-linux-musl`) - #156159 ([AIX] add -bdbg:namedsects:ss link arg) - #156174 (Wasm: remove implicit `__heap_base`/`__data_end` exports) - #156186 (fix: remap ci-llvm debug paths via `-ffile-prefix-map`) - #156193 (port `rustc_ast*` crates from `box_` to `deref_patterns`) - #156201 (Don't run ui-fulldeps tests twice in stage 1) - #155808 (Always use `ConstFn` context for `const` closures) - #156105 (interpret: correctly deal with repr(transparent) enums) - #156148 (Use `all_impls` instead of handrolling it) - #156156 (Adjust getMCSubtargetInfo signature for LLVM 23+) - #156170 (add known-bug test for coroutine 'static-yields-non-'static unsoundness (#144442)) - #156195 (Move tests codegen) - #156205 (move generalization test)
On AIX, the PGO runtime and ifunc runtime support requires the named section linker feature which collects the name sections together and generates start/stop symbols for them.
This change adds the option to the default linker args for the target.