- added mingw elf patches from Vincent Palatin

- added str9x programming using flash controller tap (str9xpec), including option bytes and device lock/unlock
- inttypes.h now used for long long printf style declarations

git-svn-id: svn://svn.berlios.de/openocd/trunk@174 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
ntfreak
2007-06-16 14:45:55 +00:00
parent 3d026ce943
commit 4b97f3cbb9
16 changed files with 1545 additions and 21 deletions

View File

@@ -23,7 +23,9 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_ELF_H
#include <elf.h>
#endif
#include "image.h"
@@ -320,8 +322,8 @@ int image_elf_read_headers(image_t *image)
elf->endianness = elf->header->e_ident[EI_DATA];
if ((elf->endianness==ELFDATANONE)
||(elf->endianness>=ELFDATANUM))
if ((elf->endianness!=ELFDATA2LSB)
&&(elf->endianness!=ELFDATA2MSB))
{
ERROR("invalid ELF file, unknown endianess setting");
return ERROR_IMAGE_FORMAT_ERROR;