summaryrefslogtreecommitdiffstats
path: root/libelf/libelf.h
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2007-10-04 08:50:09 +0000
committerRoland McGrath <[email protected]>2007-10-04 08:50:09 +0000
commit59ea7f33f781e6e3f8c9d81d457e5d99eee8f1ce (patch)
tree10a3dd35d3b568876f0edc6dd903fe8715a507e1 /libelf/libelf.h
parent057ec6b35ef97bd1cf6c1e96da3da399237e5224 (diff)
src/
2007-10-04 Roland McGrath <[email protected]> * readelf.c (print_archive_index): New variable. (options, parse_opt): Accept -c/--archive-index to set it. (dump_archive_index): New function. (process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX. Call dump_archive_index on archives if set. (main): Update caller. (any_control_option): Give it file scope, moved out of ... (parse_opt): ... here. tests/ 2007-10-04 Roland McGrath <[email protected]> * run-readelf-test4.sh: New file. * Makefile.am (TESTS, EXTRA_DIST): Add it.
Diffstat (limited to 'libelf/libelf.h')
-rw-r--r--libelf/libelf.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/libelf/libelf.h b/libelf/libelf.h
index a5d744cf..bd8dcb09 100644
--- a/libelf/libelf.h
+++ b/libelf/libelf.h
@@ -95,7 +95,7 @@ typedef struct
Elf_Type d_type; /* Type of this piece of data. */
unsigned int d_version; /* ELF version. */
size_t d_size; /* Size in bytes. */
- off_t d_off; /* Offset into section. */
+ off64_t d_off; /* Offset into section. */
size_t d_align; /* Alignment in section. */
} Elf_Data;
@@ -157,7 +157,7 @@ typedef struct
uid_t ar_uid; /* User ID. */
gid_t ar_gid; /* Group ID. */
mode_t ar_mode; /* File mode. */
- off_t ar_size; /* File size. */
+ off64_t ar_size; /* File size. */
char *ar_rawname; /* Original name of archive member. */
} Elf_Arhdr;
@@ -198,13 +198,13 @@ extern Elf_Cmd elf_next (Elf *__elf);
extern int elf_end (Elf *__elf);
/* Update ELF descriptor and write file to disk. */
-extern off_t elf_update (Elf *__elf, Elf_Cmd __cmd);
+extern off64_t elf_update (Elf *__elf, Elf_Cmd __cmd);
/* Determine what kind of file is associated with ELF. */
extern Elf_Kind elf_kind (Elf *__elf) __attribute__ ((__pure__));
/* Get the base offset for an object file. */
-extern off_t elf_getbase (Elf *__elf);
+extern off64_t elf_getbase (Elf *__elf);
/* Retrieve file identification data. */
@@ -298,6 +298,13 @@ extern Elf_Data *elf_rawdata (Elf_Scn *__scn, Elf_Data *__data);
/* Create new data descriptor for section SCN. */
extern Elf_Data *elf_newdata (Elf_Scn *__scn);
+/* Get data translated from a chunk of the file contents as section data
+ would be for TYPE. The resulting Elf_Data pointer is valid until
+ elf_end (ELF) is called. */
+extern Elf_Data *elf_getdata_rawchunk (Elf *__elf,
+ off64_t __offset, size_t __size,
+ Elf_Type __type);
+
/* Return pointer to string at OFFSET in section INDEX. */
extern char *elf_strptr (Elf *__elf, size_t __index, size_t __offset);
@@ -307,7 +314,7 @@ extern char *elf_strptr (Elf *__elf, size_t __index, size_t __offset);
extern Elf_Arhdr *elf_getarhdr (Elf *__elf);
/* Return offset in archive for current file ELF. */
-extern off_t elf_getaroff (Elf *__elf);
+extern off64_t elf_getaroff (Elf *__elf);
/* Select archive element at OFFSET. */
extern size_t elf_rand (Elf *__elf, size_t __offset);