diff options
author | Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> | 2011-09-07 16:37:22 +0900 |
---|---|---|
committer | Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> | 2011-09-07 16:37:22 +0900 |
commit | 389e1c8a6dafd3833d1d8c2db817577a9f755d52 (patch) | |
tree | 99da50ca35659f2380887d634f2cb0ed8dba88a3 /elf_info.h | |
parent | 40c5772c22662c3cc36859ce8941122414470285 (diff) |
[PATCH] Identify eraseinfo without NT_ERASE_INFO.
A new n_type NT_ERASE_INFO(0xff) is not safe, because we cannot say
"It should not be duplicated to any other".
We can identify eraseinfo by ERASEINFO_NOTE_NAME without NT_ERASE_INFO,
and this patch does it.
Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Diffstat (limited to 'elf_info.h')
-rw-r--r-- | elf_info.h | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -19,21 +19,11 @@ #include <elf.h> #include <sys/types.h> +#define ERASEINFO_NOTE_NAME "ERASEINFO" +#define ERASEINFO_NOTE_NAME_BYTES (sizeof(ERASEINFO_NOTE_NAME)) + #define MAX_SIZE_NHDR MAX(sizeof(Elf64_Nhdr), sizeof(Elf32_Nhdr)) -/* - * ELF note section for erase information - * - * According to elf.h the unused values are 0x15(21) through 0xff. The value - * range 0x1XX, 0x2XX and 0x3XX is been used for PPC, i386 and s390 - * respectively. - * - * Using 0xff to be on safer side so that any new Elf Note addition in elf.h - * after 0x15 value would not clash. - */ -#ifndef NT_ERASE_INFO -#define NT_ERASE_INFO (0xff) /* Contains erased information. */ -#endif off_t paddr_to_offset(unsigned long long paddr); off_t paddr_to_offset2(unsigned long long paddr, off_t hint); |