[lld] [lld][macho] Support order cstrings with -order_file_cstring (PR #140307)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Tue May 20 12:21:04 PDT 2025


ellishg wrote:

> @ellishg
> 
> > The format of -order_file already allows for prefixes depending on the platform and object file.
> > I think we could extend this to support the literal prefix :.
> 
> do you mean we should accept format like
> 
> ```
> arm64:file_name1:symbol1
> file_name2:symbol2
> symbol3
> cstr:0x111
> cstr:file_name4:0x222
> ```
> 
> where the first prefix is `cpu_type|"cstr":`? or do you mean we prepend an optional "cstr:", so that we can accept `cstr:arm64:file_name1:0x222`

I think it makes sense to put `cstr:` after the cpu type and file separately: `[<CPU>:][<OBJ>.o:][cstr:]<symbol>`

Maybe we should put up an RFC on https://discourse.llvm.org/

https://github.com/llvm/llvm-project/pull/140307


More information about the llvm-commits mailing list