mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-24 10:00:07 +08:00
x86-64: Remove code for debug print.
Now, we concat buffers before relocation. So this only happens when users try creating >2GB binary.
This commit is contained in:
parent
39a4b859d4
commit
85d016b507
16
tccelf.c
16
tccelf.c
@ -692,22 +692,6 @@ static void relocate_section(TCCState *s1, Section *s)
|
||||
diff = val - addr;
|
||||
}
|
||||
if (diff <= -2147483647 || diff > 2147483647) {
|
||||
#if 0
|
||||
/* output memory map to debug easily */
|
||||
FILE* fp;
|
||||
char buf[4096];
|
||||
int size;
|
||||
Dl_info di;
|
||||
printf("%ld - %ld = %ld\n", val, addr, diff);
|
||||
dladdr((void *)addr, &di);
|
||||
printf("addr = %lx = %lx+%lx(%s) ptr=%p\n",
|
||||
addr, s->sh_addr, rel->r_offset, di.dli_sname,
|
||||
ptr);
|
||||
fp = fopen("/proc/self/maps", "r");
|
||||
size = fread(buf, 1, 4095, fp);
|
||||
buf[size] = '\0';
|
||||
printf("%s", buf);
|
||||
#endif
|
||||
error("internal error: relocation failed");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user