Page MenuHomeFreeBSD
Paste P198


Authored by jrtc27 on Jul 30 2018, 3:10 PM.
/* Compile and link as a dynamic executable. */
#include <stdio.h>
__thread int aligned_var_ie __attribute__((aligned(4096),tls_model("initial-exec"))) = 0x420043;
__thread int aligned_var_le __attribute__((aligned(4096),tls_model("local-exec"))) = 0x470048;
int main(int argc, char **argv) {
printf("&aligned_var_ie: 0x%lx\n", (long)&aligned_var_ie);
printf("aligned_var_ie: 0x%x\n", aligned_var_ie);
printf("&aligned_var_le: 0x%lx\n", (long)&aligned_var_le);
printf("aligned_var_le: 0x%x\n", aligned_var_le);

Event Timeline

jrtc27 created this paste.Jul 30 2018, 3:10 PM
jrtc27 created this object in space S1 Global.
jrtc27 created this object with edit policy "jrtc27 (James Clarke)".