I'm working on my exported symbols, where often I have to join names together (like module and function name). I'd been doing this with an underscore '_' and everything worked fine. I decided to switch to '$' and suddenly the JIT execution is causing segfaults (nothing else changes). Is the '$' character somehow special and not allowed in identifiers? I also notice that other symbols, like '[' get encoded at some point into their ascii hex code it appears. It also causes problems, but at least it's visible what happened. The '$' is retained and just fails somehow... NOTE: I'm able to change to other alpha-numeric sequences and underscores, like 'A' or "__" and all works fine. So I don't think I'm getting a name wrong. -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail.
edA-qa mort-ora-y <eda-qa at disemia.com> writes:> I'm working on my exported symbols, where often I have to join names > together (like module and function name). I'd been doing this with an > underscore '_' and everything worked fine. I decided to switch to '$' > and suddenly the JIT execution is causing segfaults (nothing else changes). > > Is the '$' character somehow special and not allowed in identifiers?You are using MCJIT, aren't you? As per http://llvm.org/docs/LangRef.html#identifiers `$' is a valid character on LLVM. However, MCJIT adds the naming restrictions imposed by the object file spec it uses (ELF, IIRC). Which is something quite nasty to do for a JIT engine, IMO. [snip]
On 07/11/13 16:20, Óscar Fuentes wrote:> You are using MCJIT, aren't you?I'm using the JIT created by "EngineBuilder.setEngineKind( EngineKind::JIT )". Is that MCJIT?> `$' is a valid character on LLVM. However, MCJIT adds the naming > restrictions imposed by the object file spec it uses (ELF, IIRC). Which > is something quite nasty to do for a JIT engine, IMO.I thought $ was a safe character on my platform (Linux x86_64), since it does keep it in the symbol tables. Any idea on where to get a list of the restrictions for a platform? -- edA-qa mort-ora-y -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Sign: Please digitally sign your emails. Encrypt: I'm also happy to receive encrypted mail.