From ee646705dd9a815b115d7ee8d89ebd4cf1c71435 Mon Sep 17 00:00:00 2001 From: mcuelenaere Date: Sat, 17 May 2008 15:51:49 +0000 Subject: [PATCH] Try making binsize smaller and fix pointer problem git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17556 a1c6a512-1295-4272-9138-f99709370657 --- apps/Makefile | 2 +- tools/creative.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/Makefile b/apps/Makefile index 7fb704634..88d3155b2 100644 --- a/apps/Makefile +++ b/apps/Makefile @@ -147,7 +147,7 @@ $(OBJDIR)/rockbox.elf : $(OBJS) $(LINKFILE) $(DEPFILE) $(LIBROCKBOX) $(VOICE) $( $(call PRINTS,LD $(@F))$(CC) $(GCCOPTS) -Os -nostdlib -o $@ $(OBJS) -L$(BUILDDIR)/firmware -L$(BUILDDIR) -lrockbox $(LINKVOICE) $(LINKBITMAPS) -lgcc -T$(LINKFILE) -Wl,-Map,$(OBJDIR)/rockbox.map $(OBJDIR)/rockbox.bin : $(OBJDIR)/rockbox.elf - $(call PRINTS,OBJCOPY $(@F))$(if $(filter yes, $(USE_ELF)), cp $< $@, $(OC) -O binary $< $@) + $(call PRINTS,OBJCOPY $(@F))$(OC) $(if $(filter yes, $(USE_ELF)), -S -x, -O binary) $< $@ $(OBJDIR)/rombox.bin : $(OBJDIR)/rombox.elf $(call PRINTS,OBJCOPY $(@F))$(OC) -O binary $< $@ diff --git a/tools/creative.c b/tools/creative.c index 566904f78..faa95650a 100644 --- a/tools/creative.c +++ b/tools/creative.c @@ -84,7 +84,7 @@ static int elf_convert(const unsigned char *inbuf, unsigned char *outbuf) Elf32_Ehdr *main_header; Elf32_Shdr *section_header; unsigned int i, j, sum; - int startaddr; + intptr_t startaddr; main_header = (Elf32_Ehdr*)inbuf; if( !( main_header->e_ident[0] == ELFMAG0 && main_header->e_ident[1] == ELFMAG1 @@ -123,7 +123,7 @@ static int elf_convert(const unsigned char *inbuf, unsigned char *outbuf) outbuf += section_header->sh_size; } } - return (intptr_t)(outbuf - startaddr); + return (int)((intptr_t)outbuf - startaddr); } static int make_jrm_file(const unsigned char *inbuf, unsigned char *outbuf) -- 2.11.4.GIT