Skip to content

Commit a444181

Browse files
Rollup merge of #155517 - madsmtm:test-macho-link-section-attrs, r=bjorn3
Add a test for Mach-O `#[link_section]` API inherited from LLVM The format of the `#[link_section]` attribute is under-documented, but on Mach-O, I think it's roughly the following BNF: ``` LinkSection -> Segment `,` Section (`,` (SectionType (`,` (SectionAttributes)?)?)?)? Segment -> <0 to 16 bytes> Section -> <0 to 16 bytes> SectionType -> `regular` | `zerofill` | `cstring_literals` | `4byte_literals` | `8byte_literals` | `literal_pointers` | `non_lazy_symbol_pointers` | `lazy_symbol_pointers` | `symbol_stubs` | `mod_init_funcs` | `mod_term_funcs` | `coalesced` | `interposing` | `16byte_literals` | `thread_local_regular` | `thread_local_zerofill` | `thread_local_variables` | `thread_local_variable_pointers` | `thread_local_init_function_pointers` SectionAttributes -> SectionAttribute (`+` SectionAttribute)* SectionAttribute -> `pure_instructions` | `no_toc` | `strip_static_syms` | `no_dead_strip` | `live_support`, `self_modifying_code` | `debug` ``` This PR adds a small test for a little part of this. Once rust-lang/rust#154429 is resolved, this should make it possible to test rust-lang/rustc_codegen_cranelift#1648 end-to-end. r? bjorn3
2 parents 1b6ac2a + 2c85c08 commit a444181

0 file changed

File tree

    0 commit comments

    Comments
     (0)