create-diff-object: fix a potential overflow for rela type

rela.type should be unsigned int instead of unsighed char.

/usr/include/gelf.h:#define GELF_R_TYPE(info)   ELF64_R_TYPE (info)
/usr/include/elf.h:#define ELF64_R_TYPE(i)      ((i) & 0xffffffff)

Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
This commit is contained in:
Xie XiuQi 2014-12-31 11:07:38 +08:00
parent 97c2bea0c0
commit 6b446cba67

View File

@ -133,7 +133,7 @@ struct rela {
struct list_head list;
GElf_Rela rela;
struct symbol *sym;
unsigned char type;
unsigned int type;
int addend;
int offset;
char *string;