diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2019-02-07 20:05:52 -0800 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2019-02-07 20:05:52 -0800 |
commit | 458a54133ecdf1685c02294d812cb562fe7bf4c3 (patch) | |
tree | f3dc3a87dfdeb5d179e3f4ef73bf74d651136432 /com32/lib/sys | |
parent | b40487005223a78c3bb4c300ef6c436b3f6ec1f7 (diff) | |
download | syslinux-458a54133ecdf1685c02294d812cb562fe7bf4c3.tar.gz syslinux-458a54133ecdf1685c02294d812cb562fe7bf4c3.tar.xz syslinux-458a54133ecdf1685c02294d812cb562fe7bf4c3.zip |
Fix all warnings, and better separate code that should not be mixedsyslinux-6.04-pre3
Clean up a number of warnings in the tree.
Refactor especially the core code so we don't end up building a bunch
of BIOS-specific code for EFI, and general build cleanups.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'com32/lib/sys')
-rw-r--r-- | com32/lib/sys/module/x86_64/elf_module.c | 8 | ||||
-rw-r--r-- | com32/lib/sys/vesa/screencpy.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/com32/lib/sys/module/x86_64/elf_module.c b/com32/lib/sys/module/x86_64/elf_module.c index dd24bd12..aa89d928 100644 --- a/com32/lib/sys/module/x86_64/elf_module.c +++ b/com32/lib/sys/module/x86_64/elf_module.c @@ -241,7 +241,7 @@ int perform_relocation(struct elf_module *module, Elf_Rel *rel) { *dest += sym_addr; break; case R_X86_64_PC32: - *dest += sym_addr - (Elf32_Addr)dest; + *(uint32_t *)dest += sym_addr - (Elf64_Addr)dest; break; case R_X86_64_COPY: if (sym_addr > 0) { @@ -338,7 +338,7 @@ int resolve_symbols(struct elf_module *module) { if (rel_size > 0) { // Process standard relocations for (i = 0; i < rel_size/rel_entry; i++) { - crt_rel = (Elf64_Rel*)(rel + i*rel_entry); + crt_rel = (Elf64_Rel*)((char *)rel + i*rel_entry); res = perform_relocation(module, crt_rel); @@ -351,7 +351,7 @@ int resolve_symbols(struct elf_module *module) { if (rela_size > 0) { // Process standard relocations for (i = 0; i < rela_size/rela_entry; i++) { - crt_rel = (Elf64_Rel*)(rel + i*rela_entry); + crt_rel = (Elf64_Rel*)((char *)rel + i*rela_entry); res = perform_relocation(module, crt_rel); @@ -367,7 +367,7 @@ int resolve_symbols(struct elf_module *module) { //for (i = 0; i < plt_rel_size/sizeof(Elf64_Rel); i++) { for (i = 0; i < plt_rel_size/rela_entry; i++) { //crt_rel = (Elf64_Rel*)(plt_rel + i*sizeof(Elf64_Rel)); - crt_rel = (Elf64_Rel*)(plt_rel + i*rela_entry); + crt_rel = (Elf64_Rel*)((char *)plt_rel + i*rela_entry); res = perform_relocation(module, crt_rel); diff --git a/com32/lib/sys/vesa/screencpy.c b/com32/lib/sys/vesa/screencpy.c index d78109bc..bc53b5b5 100644 --- a/com32/lib/sys/vesa/screencpy.c +++ b/com32/lib/sys/vesa/screencpy.c @@ -59,7 +59,7 @@ void __vesacon_init_copy_to_screen(void) winn = 1; wi.win_num = winn; - wi.win_base = (char *)(mi->win_seg[winn] << 4); + wi.win_base = (char *)(uintptr_t)(mi->win_seg[winn] << 4); wi.win_size = mi->win_size << 10; wi.win_gshift = ilog2(mi->win_grain) + 10; wi.win_pos = -1; /* Undefined position */ |