diff options
-rw-r--r-- | modutils/insmod.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c index 1ae89216d..f7e9a6672 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
@@ -955,6 +955,7 @@ arch_apply_relocation(struct obj_file *f, | |||
955 | 955 | ||
956 | case R_386_PLT32: | 956 | case R_386_PLT32: |
957 | case R_386_PC32: | 957 | case R_386_PC32: |
958 | case R_386_GOTOFF: | ||
958 | *loc += v - dot; | 959 | *loc += v - dot; |
959 | break; | 960 | break; |
960 | 961 | ||
@@ -973,9 +974,6 @@ arch_apply_relocation(struct obj_file *f, | |||
973 | 974 | ||
974 | case R_386_GOT32: | 975 | case R_386_GOT32: |
975 | goto bb_use_got; | 976 | goto bb_use_got; |
976 | |||
977 | case R_386_GOTOFF: | ||
978 | *loc += v - got; | ||
979 | break; | 977 | break; |
980 | 978 | ||
981 | #elif defined(__microblaze__) | 979 | #elif defined(__microblaze__) |
@@ -4213,7 +4211,6 @@ int insmod_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
4213 | static int insmod_ng_main(int argc ATTRIBUTE_UNUSED, char **argv) | 4211 | static int insmod_ng_main(int argc ATTRIBUTE_UNUSED, char **argv) |
4214 | #endif | 4212 | #endif |
4215 | { | 4213 | { |
4216 | long ret; | ||
4217 | size_t len; | 4214 | size_t len; |
4218 | int optlen; | 4215 | int optlen; |
4219 | void *map; | 4216 | void *map; |
@@ -4234,6 +4231,11 @@ static int insmod_ng_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
4234 | 4231 | ||
4235 | #if 0 | 4232 | #if 0 |
4236 | /* Any special reason why mmap? It isn't performace critical... */ | 4233 | /* Any special reason why mmap? It isn't performace critical... */ |
4234 | |||
4235 | /* yes, xmalloc'ing can use *alot* of RAM. Don't forget that there are | ||
4236 | * modules out there that are half a megabyte! mmap()ing is way nicer | ||
4237 | * for small mem boxes, i guess. | ||
4238 | */ | ||
4237 | int fd; | 4239 | int fd; |
4238 | struct stat st; | 4240 | struct stat st; |
4239 | unsigned long len; | 4241 | unsigned long len; |
@@ -4255,11 +4257,9 @@ static int insmod_ng_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
4255 | map = xmalloc_open_read_close(filename, &len); | 4257 | map = xmalloc_open_read_close(filename, &len); |
4256 | #endif | 4258 | #endif |
4257 | 4259 | ||
4258 | ret = syscall(__NR_init_module, map, len, options); | 4260 | if (syscall(__NR_init_module, map, len, options) != 0) |
4259 | if (ret != 0) { | ||
4260 | bb_error_msg_and_die("cannot insert '%s': %s", | 4261 | bb_error_msg_and_die("cannot insert '%s': %s", |
4261 | filename, moderror(errno)); | 4262 | filename, moderror(errno)); |
4262 | } | ||
4263 | 4263 | ||
4264 | return 0; | 4264 | return 0; |
4265 | } | 4265 | } |