Skip to content

lld doesn't support TLSDESC (-mtls-dialect=gnu2) for arm #155215

@thesamesam

Description

@thesamesam

lld does not support TLSDESC (-mtls-dialect=gnu2) for arm. We are currently looking to make -mtls-dialect=gnu2 the default for x86 in GCC. ARM may follow depending on how that goes.

extern __thread int tlsdesc;
int get(void) { return tlsdesc; }
$ gcc a.c -shared -fuse-ld=lld -mtls-dialect=gnu2 -fPIC
ld.lld: error: /tmp/ccvULiJP.o:(function get: .text+0xc): unknown relocation (91) against symbol tlsdesc
ld.lld: error: internal linker error: cannot read addend for relocation R_ARM_TLS_CALL
ld.lld: error: /tmp/ccvULiJP.o:(function get: .text+0x24): unknown relocation (90) against symbol tlsdesc
ld.lld: error: internal linker error: cannot read addend for relocation R_ARM_TLS_GOTDESC
collect2: error: ld returned 1 exit status

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions