-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
overflow in relocation type R_X86_64_32S(11) val 556ddb198110 #5
Comments
The same one |
Check the
Because the address value bigger than 32bit, thus overflow. If i compile the ulpatch ELF file without rongtao@rtoax:~/Git/ulpatch/tests/hello$ readelf -r patch-pthread.ulp
Relocation section '.rela.text' at offset 0x490 contains 11 entries:
Offset Info Type Sym. Value Sym. Name + Addend
00000000000d 00040000000a R_X86_64_32 0000000000000000 .rodata + 0
000000000012 001000000004 R_X86_64_PLT32 0000000000000000 puts - 4
00000000001c 001100000004 R_X86_64_PLT32 0000000000000000 sleep - 4
000000000030 000e00000002 R_X86_64_PC32 0000000000000000 not_created - 4
000000000039 00040000000a R_X86_64_32 0000000000000000 .rodata + 19
00000000003e 001000000004 R_X86_64_PLT32 0000000000000000 puts - 4
000000000044 000e00000002 R_X86_64_PC32 0000000000000000 not_created - 8
000000000052 00130000000a R_X86_64_32 0000000000000000 routine + 0
00000000005c 00120000000a R_X86_64_32 0000000000000008 thread + 0
000000000061 000d00000004 R_X86_64_PLT32 0000000000000000 pthread_create - 4
00000000006d 001400000004 R_X86_64_PLT32 0000000000000000 internal_print_hello - 4
Relocation section '.rela.eh_frame' at offset 0x598 contains 2 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000000020 000300000002 R_X86_64_PC32 0000000000000000 .text + 0
00000000003c 000300000002 R_X86_64_PC32 0000000000000000 .text + 22 |
Link: #5 Signed-off-by: Rong Tao <[email protected]>
libcare/libcareplus seems work fine!! |
Figure it out there is no |
You can see this: #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "common.h"
int local_i = 123;
static long __unused static_i = 1024;
static char __unused *static_s = "you";
void init(void)
{
local_i++;
static_i++;
static_s++;
printf("\n");
debug();
}
void done(void)
{
debug();
}
|
You can see this, it's could give you some advise: #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "common.h"
int local_i = 123;
static long __unused static_i = 1024;
static char __unused *static_s = "you";
void init(void)
{
local_i++;
static_i++;
static_s++;
printf("\n");
debug();
}
void done(void)
{
debug();
}
|
Some useful informations: The ulpatch file compile without
|
See https://github.com/Rtoax/test-linux/issues/6, Like kernel Makefile KBUILD_CFLAGS:
|
Maybe 8cd1f73 could resolve this problem. and i'm sure kernel module address is smaller than 0xFFFFFFFFUL (see https://github.com/Rtoax/test-linux/commit/76a2208a5b0c04e7c4c8414c2de8cedd752c1763) |
Finish: commit 8500222 ("utils/task: find_vma_span_area(): Add first var") Signed-off-by: Rong Tao <[email protected]>
Link: #5 Signed-off-by: Rong Tao <[email protected]>
When i running tests/hello/hello-pie:
found the error:
The text was updated successfully, but these errors were encountered: