* [PATCH] arm64: build with -mcmodel=large
@ 2015-12-24 4:14 Colin Watson
2015-12-24 4:14 ` Colin Watson
2015-12-24 4:20 ` Colin Watson
0 siblings, 2 replies; 8+ messages in thread
From: Colin Watson @ 2015-12-24 4:14 UTC (permalink / raw)
To: grub-devel; +Cc: Leif Lindholm
This fixes a build failure with very current GCC versions, such as the one
in Ubuntu xenial. Leif (or anyone with suitable arm64 systems), would you
mind testing that this doesn't break things? I've tested that it builds
cleanly now, but I don't have a particularly convenient way to do any
run-time tests.
Colin Watson (1):
arm64: build with -mcmodel=large
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.6.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] arm64: build with -mcmodel=large
2015-12-24 4:14 [PATCH] arm64: build with -mcmodel=large Colin Watson
@ 2015-12-24 4:14 ` Colin Watson
2015-12-24 4:20 ` Colin Watson
1 sibling, 0 replies; 8+ messages in thread
From: Colin Watson @ 2015-12-24 4:14 UTC (permalink / raw)
To: grub-devel; +Cc: Leif Lindholm
This matches some other 64-bit architectures, and fixes a build failure
with current GCC versions: when using the default (small) memory model,
they generate relocations that grub-mkimage doesn't understand.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 3300545..bbb7b61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1083,7 +1083,7 @@ AC_SUBST(TARGET_LDFLAGS_OLDMAGIC)
LDFLAGS="$TARGET_LDFLAGS"
-if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 ; then
+if test "$target_cpu" = x86_64 || test "$target_cpu" = sparc64 || test "$target_cpu" = arm64; then
# Use large model to support 4G memory
AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
CFLAGS="$TARGET_CFLAGS -mcmodel=large"
--
2.6.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] arm64: build with -mcmodel=large
2015-12-24 4:14 [PATCH] arm64: build with -mcmodel=large Colin Watson
2015-12-24 4:14 ` Colin Watson
@ 2015-12-24 4:20 ` Colin Watson
2015-12-25 18:18 ` Leif Lindholm
1 sibling, 1 reply; 8+ messages in thread
From: Colin Watson @ 2015-12-24 4:20 UTC (permalink / raw)
To: grub-devel; +Cc: Leif Lindholm
On Thu, Dec 24, 2015 at 04:14:20AM +0000, Colin Watson wrote:
> This fixes a build failure with very current GCC versions, such as the one
> in Ubuntu xenial. Leif (or anyone with suitable arm64 systems), would you
> mind testing that this doesn't break things? I've tested that it builds
> cleanly now, but I don't have a particularly convenient way to do any
> run-time tests.
Never mind, I spoke too soon and withdraw this patch, since this doesn't
actually fix the problem, which is:
$ obj/grub-efi-arm64/grub-mkimage -O arm64-efi -o test.efi -d obj/grub-efi-arm64/grub-core -p /boot/grub -v ext2
obj/grub-efi-arm64/grub-mkimage: info: the total module size is 0x37e8.
obj/grub-efi-arm64/grub-mkimage: info: reading obj/grub-efi-arm64/grub-core/kernel.img.
obj/grub-efi-arm64/grub-mkimage: info: locating the section .text at 0x0.
obj/grub-efi-arm64/grub-mkimage: info: locating the section .rodata at 0xa200.
obj/grub-efi-arm64/grub-mkimage: info: locating the section .rodata.str1.1 at 0xa2a6.
obj/grub-efi-arm64/grub-mkimage: info: locating the section .data at 0xbbf8.
obj/grub-efi-arm64/grub-mkimage: info: locating the section .bss at 0xcc60.
obj/grub-efi-arm64/grub-mkimage: info: locating at 0x400 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating at 0xa600 (0xa600).
obj/grub-efi-arm64/grub-mkimage: info: locating at 0xa6a6 (0xa6a6).
obj/grub-efi-arm64/grub-mkimage: info: locating at 0xbff8 (0xbff8).
obj/grub-efi-arm64/grub-mkimage: info: locating at 0xd060 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating at 0x400 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_strlen at 0x83e4 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_net_poll_cards_idle at 0xeda0 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_finish_boot_services at 0x3368 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_disk_get_size at 0x5ac8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_file_progress_hook at 0x18e88 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efidisk_fini at 0xd44 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_arm64_set_xxxx26_offset at 0x9a0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_puts_ at 0x80c0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_millisleep at 0x45e8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_fs_autoload_hook at 0xeb80 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_allocate_pages_max at 0x30c0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_fs_blocklist at 0xc150 (0xbff8).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_errmsg at 0x18d80 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_strncmp at 0x819c (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_strtoull at 0x850c (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_system_table at 0xeda8 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating memmove at 0x8064 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_disk_open at 0x5528 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_locate_protocol at 0x1dc4 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_env_update_get_sorted at 0x6c90 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_strcpy at 0x80a8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_partition_probe at 0x99d0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_strrchr at 0x81fc (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_partition_get_name at 0x9c10 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_dl_load at 0x68c0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_stall at 0x1fe0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_get_filename at 0x2498 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_env_export at 0x6db0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_xvasprintf at 0x9340 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_error_push at 0x6ed8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating __bswapsi2 at 0xa4d0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_rescue_run at 0xa208 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_xasprintf at 0x93e0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_realloc at 0x4510 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_exit at 0x2020 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating memcpy at 0x8064 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_memmove at 0x8064 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_device_open at 0x4cd0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_register_exported_symbols at 0xa488 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_strdup at 0x8400 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_disk_firmware_is_tainted at 0xedd8 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_divmod64 at 0x8494 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_file_get_device_name at 0x70d8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_print_device_path at 0x26b4 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_partition_iterate at 0x9b80 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_vsnprintf at 0x9248 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_partition_map_list at 0x18ed8 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_command_list at 0xedd0 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_machine_fini at 0x500 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_arch_dl_get_tramp_got_size at 0x710 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_rescue_parse_line at 0x9f70 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_get_variable at 0x21b8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_snprintf at 0x92cc (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_register_core_commands at 0x4af0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_disk_dev_register at 0x5418 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_console_init at 0x3de8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_disk_write_weak at 0xede0 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_dl_add at 0x5be0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_disk_read at 0x57c0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_term_highlight_color at 0xc2f0 (0xbff8).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_parser_execute at 0x9958 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_xputs at 0xc2e8 (0xbff8).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_console_fini at 0x3ef8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_fatal at 0x9458 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_dl_ref at 0x5d10 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_file_seek at 0x7468 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_get_loaded_image at 0x2000 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_errno at 0x18e80 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_parser_cmdline_state at 0x961c (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_memset at 0x8350 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_getkey at 0xa468 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_term_outputs_disabled at 0x18ee0 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_grubnet_fini at 0x18e90 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_register_variable_hook at 0x6d38 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_image_handle at 0xedb0 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_vprintf at 0x8f38 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_net_open at 0xd0d0 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_register_command_prio at 0x4620 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_find_last_device_path at 0x25e0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_compare_device_paths at 0x2eb8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_file_filters_all at 0x18e98 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_install_get_time_ms at 0x45d0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_arch_clean_dcache_range at 0x698 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating _start at 0x400 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_term_inputs at 0x18ee8 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_parser_split_cmdline at 0x96f8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_disk_firmware_fini at 0xede8 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_disk_close at 0x5478 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_dl_unload at 0x5da8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_set_variable at 0x20c8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_printf at 0x9048 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_secure_boot at 0x22b8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_unregister_command at 0x4728 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_fs_list at 0xeb78 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efidisk_get_device_handle at 0x1730 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_main at 0x7ab0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_file_read at 0x7180 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_dl_unload_unneeded at 0x69a8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating __bswapdi2 at 0xa4d8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating memcmp at 0x8138 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_term_normal_color at 0xc2f1 (0xbff8).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_disk_dev_list at 0xedf0 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_machine_init at 0x468 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_locate_handle at 0x1e08 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_term_outputs at 0x18ef0 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_modbase at 0xedb8 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_term_inputs_disabled at 0x18ef8 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_net_config at 0xedc0 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_set_virtual_address_map at 0x2070 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_print_error at 0x7008 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_mm_init at 0x3588 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating memset at 0x8350 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_zalloc at 0x423c (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_strcmp at 0x816c (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_allocate_pages at 0x3178 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_strchr at 0x81e0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_refresh at 0xa420 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_malloc at 0x4230 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_arch_sync_caches at 0x568 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_get_memory_map at 0x3240 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efidisk_get_device_name at 0x18a4 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_get_time_ms at 0x45b8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_arch_invalidate_icache_range at 0x6b8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_file_close at 0x7250 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_file_open at 0x72b0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_isspace at 0x821c (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_open_protocol at 0x1ef0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_real_dprintf at 0x9150 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_dl_load_core_noinit at 0x5ec0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_dl_load_file at 0x67d8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_env_unset at 0x6c00 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_device_close at 0x4dc0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_dl_head at 0xd0e0 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_fs_probe at 0x7788 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_mm_base at 0xedc8 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_term_poll_usb at 0xed98 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_file_filters_enabled at 0x18eb8 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_strword at 0x82a4 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_machine_get_bootlocation at 0x2fe0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_fini at 0x3088 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_err_printed_errors at 0x18e84 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_error at 0x6e08 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_current_context at 0xc148 (0xbff8).
obj/grub-efi-arm64/grub-mkimage: info: locating efi_codes at 0xa638 (0xa600).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_dl_register_symbol at 0x5c30 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_is_finished at 0xd098 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_list_remove at 0x79f8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_modules_get_end at 0x7a78 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_free at 0x427c (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_strndup at 0x8444 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_arm_64_check_xxxx26_offset at 0x988 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_named_list_find at 0x7990 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_dl_unref at 0x5d5c (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_duplicate_device_path at 0x2640 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efidisk_init at 0x14c0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_disk_dev_unregister at 0x5438 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_init at 0x2f80 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_arch_dl_check_header at 0x6d8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_arch_dl_relocate_symbols at 0x79c (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_free_pages at 0x30a0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_printf_ at 0x90c0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_get_device_path at 0x25c0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_modules_addr at 0x23c8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_error_pop at 0x6f78 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_device_iterate at 0x4f08 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_getkey_noblock at 0xa3a0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_list_push at 0x79d8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_efi_set_text_mode at 0x1f50 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_err_printf at 0x9048 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_disk_cache_invalidate_all at 0x53b8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_env_set at 0x6a88 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_dl_load_core at 0x6780 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_gettext at 0xc1a0 (0xbff8).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_memcmp at 0x8138 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_env_get at 0x6bc8 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_strtoul at 0x8a40 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_mm_init_region at 0x43c0 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_disk_cache_table at 0xedf8 (0xd060).
obj/grub-efi-arm64/grub-mkimage: info: locating grub_memalign at 0x4028 (0x400).
obj/grub-efi-arm64/grub-mkimage: info: dealing with the relocation section .rela.text for .text.
obj/grub-efi-arm64/grub-mkimage: error: relocation 0x113 is not implemented yet.
Would anyone arm64-knowledgeable mind taking a look at this?
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm64: build with -mcmodel=large
2015-12-24 4:20 ` Colin Watson
@ 2015-12-25 18:18 ` Leif Lindholm
2015-12-31 12:52 ` Vladimir 'φ-coder/phcoder' Serbinenko
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Leif Lindholm @ 2015-12-25 18:18 UTC (permalink / raw)
To: Colin Watson; +Cc: grub-devel
On Thu, Dec 24, 2015 at 04:20:29AM +0000, Colin Watson wrote:
> On Thu, Dec 24, 2015 at 04:14:20AM +0000, Colin Watson wrote:
> > This fixes a build failure with very current GCC versions, such as the one
> > in Ubuntu xenial. Leif (or anyone with suitable arm64 systems), would you
> > mind testing that this doesn't break things? I've tested that it builds
> > cleanly now, but I don't have a particularly convenient way to do any
> > run-time tests.
>
> Never mind, I spoke too soon and withdraw this patch, since this doesn't
> actually fix the problem, which is:
>
> $ obj/grub-efi-arm64/grub-mkimage -O arm64-efi -o test.efi -d obj/grub-efi-arm64/grub-core -p /boot/grub -v ext2
> obj/grub-efi-arm64/grub-mkimage: info: the total module size is 0x37e8.
*snip*
> obj/grub-efi-arm64/grub-mkimage: info: dealing with the relocation section .rela.text for .text.
> obj/grub-efi-arm64/grub-mkimage: error: relocation 0x113 is not implemented yet.
>
> Would anyone arm64-knowledgeable mind taking a look at this?
So, it seems this toolchain generates the HI21/LO12 relocation combo:
- R_AARCH64_ADR_PREL_PG_HI21/R_AARCH64_ADR_PREL_PG_HI21_NC
- R_AARCH64_LDST16_ABS_LO12_NC
- R_AARCH64_LDST32_ABS_LO12_NC
- R_AARCH64_LDST64_ABS_LO12_NC
- R_AARCH64_LDST128_ABS_LO12_NC
So I'll implement support for these.
With regards to your -mcmodel=large patch - that didn't change
anything because I already hardcoded that into
conf/Makefile.common. Your suggested patch is probably the better way
of doing it - so do consider pushing that anyway (dropping the
Makefile.common stanza at the same time).
/
Leif
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm64: build with -mcmodel=large
2015-12-25 18:18 ` Leif Lindholm
@ 2015-12-31 12:52 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-12-31 16:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
2016-01-22 2:14 ` Colin Watson
2 siblings, 0 replies; 8+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2015-12-31 12:52 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 2099 bytes --]
On 25.12.2015 19:18, Leif Lindholm wrote:
> On Thu, Dec 24, 2015 at 04:20:29AM +0000, Colin Watson wrote:
>> On Thu, Dec 24, 2015 at 04:14:20AM +0000, Colin Watson wrote:
>>> This fixes a build failure with very current GCC versions, such as the one
>>> in Ubuntu xenial. Leif (or anyone with suitable arm64 systems), would you
>>> mind testing that this doesn't break things? I've tested that it builds
>>> cleanly now, but I don't have a particularly convenient way to do any
>>> run-time tests.
>>
>> Never mind, I spoke too soon and withdraw this patch, since this doesn't
>> actually fix the problem, which is:
>>
>> $ obj/grub-efi-arm64/grub-mkimage -O arm64-efi -o test.efi -d obj/grub-efi-arm64/grub-core -p /boot/grub -v ext2
>> obj/grub-efi-arm64/grub-mkimage: info: the total module size is 0x37e8.
>
> *snip*
>
>> obj/grub-efi-arm64/grub-mkimage: info: dealing with the relocation section .rela.text for .text.
>> obj/grub-efi-arm64/grub-mkimage: error: relocation 0x113 is not implemented yet.
>>
>> Would anyone arm64-knowledgeable mind taking a look at this?
>
> So, it seems this toolchain generates the HI21/LO12 relocation combo:
> - R_AARCH64_ADR_PREL_PG_HI21/R_AARCH64_ADR_PREL_PG_HI21_NC
> - R_AARCH64_LDST16_ABS_LO12_NC
> - R_AARCH64_LDST32_ABS_LO12_NC
> - R_AARCH64_LDST64_ABS_LO12_NC
> - R_AARCH64_LDST128_ABS_LO12_NC
>
> So I'll implement support for these.
>
I'm looking forward for those patches
Unfortunately missing relocation support is common problem. I added a
verifier in build system to catch it on build time rather than runtime
> With regards to your -mcmodel=large patch - that didn't change
> anything because I already hardcoded that into
> conf/Makefile.common. Your suggested patch is probably the better way
> of doing it - so do consider pushing that anyway (dropping the
> Makefile.common stanza at the same time).
>
> /
> Leif
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm64: build with -mcmodel=large
2015-12-25 18:18 ` Leif Lindholm
2015-12-31 12:52 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2015-12-31 16:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
2016-01-22 2:14 ` Colin Watson
2 siblings, 0 replies; 8+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2015-12-31 16:09 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 1966 bytes --]
On 25.12.2015 19:18, Leif Lindholm wrote:
> On Thu, Dec 24, 2015 at 04:20:29AM +0000, Colin Watson wrote:
>> On Thu, Dec 24, 2015 at 04:14:20AM +0000, Colin Watson wrote:
>>> This fixes a build failure with very current GCC versions, such as the one
>>> in Ubuntu xenial. Leif (or anyone with suitable arm64 systems), would you
>>> mind testing that this doesn't break things? I've tested that it builds
>>> cleanly now, but I don't have a particularly convenient way to do any
>>> run-time tests.
>>
>> Never mind, I spoke too soon and withdraw this patch, since this doesn't
>> actually fix the problem, which is:
>>
>> $ obj/grub-efi-arm64/grub-mkimage -O arm64-efi -o test.efi -d obj/grub-efi-arm64/grub-core -p /boot/grub -v ext2
>> obj/grub-efi-arm64/grub-mkimage: info: the total module size is 0x37e8.
>
> *snip*
>
>> obj/grub-efi-arm64/grub-mkimage: info: dealing with the relocation section .rela.text for .text.
>> obj/grub-efi-arm64/grub-mkimage: error: relocation 0x113 is not implemented yet.
>>
>> Would anyone arm64-knowledgeable mind taking a look at this?
>
> So, it seems this toolchain generates the HI21/LO12 relocation combo:
> - R_AARCH64_ADR_PREL_PG_HI21/R_AARCH64_ADR_PREL_PG_HI21_NC
> - R_AARCH64_LDST16_ABS_LO12_NC
> - R_AARCH64_LDST32_ABS_LO12_NC
> - R_AARCH64_LDST64_ABS_LO12_NC
> - R_AARCH64_LDST128_ABS_LO12_NC
>
> So I'll implement support for these.
>
relocations 264, 266, 268, 269 are also missing
> With regards to your -mcmodel=large patch - that didn't change
> anything because I already hardcoded that into
> conf/Makefile.common. Your suggested patch is probably the better way
> of doing it - so do consider pushing that anyway (dropping the
> Makefile.common stanza at the same time).
>
> /
> Leif
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm64: build with -mcmodel=large
2015-12-25 18:18 ` Leif Lindholm
2015-12-31 12:52 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-12-31 16:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2016-01-22 2:14 ` Colin Watson
2016-01-22 18:13 ` Vladimir 'φ-coder/phcoder' Serbinenko
2 siblings, 1 reply; 8+ messages in thread
From: Colin Watson @ 2016-01-22 2:14 UTC (permalink / raw)
To: grub-devel
On Fri, Dec 25, 2015 at 06:18:55PM +0000, Leif Lindholm wrote:
> So, it seems this toolchain generates the HI21/LO12 relocation combo:
> - R_AARCH64_ADR_PREL_PG_HI21/R_AARCH64_ADR_PREL_PG_HI21_NC
> - R_AARCH64_LDST16_ABS_LO12_NC
> - R_AARCH64_LDST32_ABS_LO12_NC
> - R_AARCH64_LDST64_ABS_LO12_NC
> - R_AARCH64_LDST128_ABS_LO12_NC
>
> So I'll implement support for these.
I found a temporary workaround for this via
https://bugs.launchpad.net/bugs/1533009, which refers to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63304; given that set of
clues, I've confirmed that TARGET_CFLAGS='-Os
-mpc-relative-literal-loads' fixes my build for the time being.
This isn't necessarily a good solution for upstream, because only
certain versions of GCC support it (although perhaps we could detect it
in configure.ac until such time as appropriate relocation support is
added?), but I'm mentioning it here in case any other distributors have
the same problem.
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] arm64: build with -mcmodel=large
2016-01-22 2:14 ` Colin Watson
@ 2016-01-22 18:13 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 8+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2016-01-22 18:13 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]
On 22.01.2016 03:14, Colin Watson wrote:
> On Fri, Dec 25, 2015 at 06:18:55PM +0000, Leif Lindholm wrote:
>> So, it seems this toolchain generates the HI21/LO12 relocation combo:
>> - R_AARCH64_ADR_PREL_PG_HI21/R_AARCH64_ADR_PREL_PG_HI21_NC
>> - R_AARCH64_LDST16_ABS_LO12_NC
>> - R_AARCH64_LDST32_ABS_LO12_NC
>> - R_AARCH64_LDST64_ABS_LO12_NC
>> - R_AARCH64_LDST128_ABS_LO12_NC
>>
>> So I'll implement support for these.
>
> I found a temporary workaround for this via
> https://bugs.launchpad.net/bugs/1533009, which refers to
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63304; given that set of
> clues, I've confirmed that TARGET_CFLAGS='-Os
> -mpc-relative-literal-loads' fixes my build for the time being.
>
> This isn't necessarily a good solution for upstream, because only
> certain versions of GCC support it (although perhaps we could detect it
> in configure.ac until such time as appropriate relocation support is
> added?), but I'm mentioning it here in case any other distributors have
> the same problem.
>
I have implemented and committed the support for needed relocations
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-01-22 18:13 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-24 4:14 [PATCH] arm64: build with -mcmodel=large Colin Watson
2015-12-24 4:14 ` Colin Watson
2015-12-24 4:20 ` Colin Watson
2015-12-25 18:18 ` Leif Lindholm
2015-12-31 12:52 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-12-31 16:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
2016-01-22 2:14 ` Colin Watson
2016-01-22 18:13 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).