app/test: support resources externally linked
authorJan Viktorin <viktorin@rehivetech.com>
Mon, 13 Jun 2016 15:07:38 +0000 (17:07 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 13 Jun 2016 18:56:48 +0000 (20:56 +0200)
commitab64f5df8004d7187613a542bf3df29de49f597f
tree5b3c0f9425c5bce99bbc51133a6232e091926e79
parentfe6923cbfd7619e6650e8f5ae6bbbc949273059b
app/test: support resources externally linked

To include resources from other source that the C source code we
can take advantage of the objcopy behaviour, i.e. packing of an
arbitrary file as an object file that is linked to the target program.

A linked object file is always accessible as a pair

extern const char beg_<name>;
extern const char end_<name>;
(extern const char siz_<name>;)

A unit test that packs the resource.c source file is included.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
app/test/Makefile
app/test/resource.h
app/test/test_resource.c