zephyr/tests/kernel
Andy Ross 6b3c5e8bb2 x86 link: Specify ALIGN_WITH_INPUT for XIP data sections
Binutils ld has an annoying misfeature (apparently a regression from a
few years ago) that alignment directives (and alignment specifiers on
symbols) apply only to the runtime addresses and not, apparently, to
the load address region specified with the "AT>" syntax.  The net
result is that by default the LMA output ends up too small for the
addresses generated in RAM.  See here for some details:

    https://sourceware.org/ml/binutils/2013-06/msg00246.html
    https://sourceware.org/ml/binutils/2014-01/msg00350.html

The required workaround/fix is that AFAICT any section which can have
inherit a separate VMA vs. LMA from a previous section must specify an
"ALIGN_WITH_INPUT" attribute.  Otherwise the sections will get out of
sync and the XIP data will be wrong at runtime.

No, I don't know why this isn't the default behavior.

A further complexity is that this feature only works as advertised
when the section is declared with the "AT> region" syntax after the
block and not "AT(address)" in the header.  If you use the header
syntax (with or without ALIGN_WITH_INPUT), ld appears to DOUBLE-apply
padding and the LMA ends up to big.  This is almost certainly a
binutils bug, but it's trivial to work around (and the working syntax
is actually cleaner) so we adjust the usage here.

Note finally that this patch includes an effective reversion of commit
d82e9dd9 ("x86: HACK force alignment for _k_task_list section"), which
was an earlier workaround for what seems to be the same issue.

Jira: ZEP-955

Change-Id: I2accd92901cb61fb546658b87d6752c1cd14de3a
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-10-01 01:41:50 +00:00
..
test_arm_m3_irq_vector_table boards: remove obsolete board basic_cortex_m3 2016-09-22 22:09:33 +00:00
test_atomic unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_bitfield unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_build testcases: sanity check TCs get more language for real HW 2016-06-14 23:49:56 +00:00
test_context unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_critical tags: basic kernel objects test for actual hardware 2016-07-01 00:38:31 +00:00
test_early_sleep tags: basic kernel objects test for actual hardware 2016-07-01 00:38:31 +00:00
test_errno build: move from srctree to ZEPHYR_BASE for app include paths 2016-06-30 14:36:39 +00:00
test_events unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_fifo unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_fifo_priv unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_fp_sharing tests: fp_sharing: removing dependency on ARCH 2016-09-15 21:16:40 +00:00
test_intmath build: move from srctree to ZEPHYR_BASE for app include paths 2016-06-30 14:36:39 +00:00
test_ipm boards: rename Quark SE Devboard to Quark SE C1000 (Sensor Subsystem) 2016-09-16 03:10:30 +00:00
test_irq_offload build: move from srctree to ZEPHYR_BASE for app include paths 2016-06-30 14:36:39 +00:00
test_libs tags: basic kernel objects test for actual hardware 2016-07-01 00:38:31 +00:00
test_lifo build: move from srctree to ZEPHYR_BASE for app include paths 2016-06-30 14:36:39 +00:00
test_mail unified: Enable memory pools in mailbox tests 2016-09-20 22:04:46 +00:00
test_mail_priv unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_map unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_map_priv unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_mem_safe x86 link: Specify ALIGN_WITH_INPUT for XIP data sections 2016-10-01 01:41:50 +00:00
test_multilib tests/kernel/test_multilib: Test for proper multilib selection. 2016-09-19 13:58:11 +03:00
test_mutex unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_nano_work unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_obj_tracing tracing: test includes ipc console fiber if enabled 2016-07-08 20:34:30 +00:00
test_pend unified: Make test_pend unified capable. 2016-09-23 18:51:07 +00:00
test_pipe unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_pipe_priv unified/tests: tag working some tests kernel as 'unified_capable' 2016-09-13 17:12:55 -04:00
test_pool unified: Make memory pool test unified capable 2016-09-20 22:04:47 +00:00
test_printk tests: test_printk: crude printk test case 2016-08-28 07:47:28 -04:00
test_rand32 tags: basic kernel objects test for actual hardware 2016-07-01 00:38:31 +00:00
test_ring_buf build: move from srctree to ZEPHYR_BASE for app include paths 2016-06-30 14:36:39 +00:00
test_sema unified: Fix semaphore group tests 2016-09-20 11:45:28 -04:00
test_sema_priv tags: basic kernel objects test for actual hardware 2016-07-01 00:38:31 +00:00
test_sleep tests: kernel: fix incorrect printk() usage 2016-08-28 07:47:28 -04:00
test_slist build: move from srctree to ZEPHYR_BASE for app include paths 2016-06-30 14:36:39 +00:00
test_sprintf/microkernel build: move from srctree to ZEPHYR_BASE for app include paths 2016-06-30 14:36:39 +00:00
test_stack/nanokernel build: move from srctree to ZEPHYR_BASE for app include paths 2016-06-30 14:36:39 +00:00
test_stackprot tags: basic kernel objects test for actual hardware 2016-07-01 00:38:31 +00:00
test_static_idt x86: exceptions: simplify exception stubs 2016-09-28 20:28:07 +00:00
test_task tests/kernel/{test_task,test_sleep}: Less aggressive timer testing 2016-08-10 16:42:51 +00:00
test_task_priv tags: basic kernel objects test for actual hardware 2016-07-01 00:38:31 +00:00
test_tickless/microkernel tests: remove dependency on architecture and use one prj.conf 2016-09-15 21:16:39 +00:00
test_timer k_timer: Don't allocate dynamic timers by default 2016-09-23 18:25:37 +00:00
test_xip tags: basic kernel objects test for actual hardware 2016-07-01 00:38:31 +00:00