Skip to content

Commit

Permalink
add binary which has a single R_X86_64_TPOFF64 relocation
Browse files Browse the repository at this point in the history
```C
// libfootls.c
__thread int foo_tls = 42;
```

```C
// ext_tls.c
extern __thread int foo_tls;
int main() {
    return foo_tls;
}
```

```bash
gcc -c -Wall -Werror -fpic libfootls.c
gcc -shared -o libfootls.so libfootls.o

gcc -L./ -Wl,-rpath=./ -Wall -o ext_tls ext_tls.c -lfootls
$ ./ext_tls
```
  • Loading branch information
koyaan committed Mar 25, 2024
1 parent 9d177da commit 1c9def1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 0 deletions.
Binary file added elf/tls/ext_tls
Binary file not shown.
Binary file added elf/tls/libfootls.so
Binary file not shown.

0 comments on commit 1c9def1

Please sign in to comment.