diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-17 22:20:51 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-06-17 22:20:51 +0000 |
commit | 5634082c7a9357bf6f68be7411d18c11eb40437a (patch) | |
tree | ab42e33a8451f06fee3ffad81bdc2f438b8e7398 /nuttx/binfmt | |
parent | f44c80d64924b5796a547d2d4e787591da58726d (diff) | |
download | px4-nuttx-5634082c7a9357bf6f68be7411d18c11eb40437a.tar.gz px4-nuttx-5634082c7a9357bf6f68be7411d18c11eb40437a.tar.bz2 px4-nuttx-5634082c7a9357bf6f68be7411d18c11eb40437a.zip |
Fixes for compilation with ez80
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1898 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/binfmt')
-rw-r--r-- | nuttx/binfmt/Makefile | 2 | ||||
-rw-r--r-- | nuttx/binfmt/libnxflat/libnxflat_load.c | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/nuttx/binfmt/Makefile b/nuttx/binfmt/Makefile index 015981d4e..589964c86 100644 --- a/nuttx/binfmt/Makefile +++ b/nuttx/binfmt/Makefile @@ -35,7 +35,7 @@ -include $(TOPDIR)/Make.defs -CFLAGS += -I$(TOPDIR)/sched +CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh "$(CC)" $(TOPDIR)/sched} ifeq ($(CONFIG_NXFLAT),y) include libnxflat/Make.defs diff --git a/nuttx/binfmt/libnxflat/libnxflat_load.c b/nuttx/binfmt/libnxflat/libnxflat_load.c index 77ced1b64..aa00f50c7 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_load.c +++ b/nuttx/binfmt/libnxflat/libnxflat_load.c @@ -75,6 +75,10 @@ static const char *g_segment[] = g_bsssegment, g_unksegment }; + +# define SEGNAME(rl) g_segment[NXFLAT_RELOC_TYPE(rl)] +#else +# define SEGNAME(rl) "(no name)" #endif /**************************************************************************** @@ -124,7 +128,7 @@ static void nxflat_reloc(struct nxflat_loadinfo_s *loadinfo, uint32 rl) bvdbg("Relocation of variable at DATASEG+0x%08x " "(address 0x%p, currently 0x%08x) into segment %s\n", - NXFLAT_RELOC_OFFSET(rl), ptr, *ptr, g_segment[NXFLAT_RELOC_TYPE(rl)]); + NXFLAT_RELOC_OFFSET(rl), ptr, *ptr, SEGNAME(rl)); switch (NXFLAT_RELOC_TYPE(rl)) { @@ -182,7 +186,7 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo) off_t doffset; /* Offset to .data in the NXFLAT file */ uint32 *reloctab; /* Address of the relocation table */ uint32 dreadsize; /* Total number of bytes of .data to be read */ - uint32 ret; + uint32 ret = OK; int i; /* Calculate the extra space we need to allocate. This extra space will be |