75 Commits

Author SHA1 Message Date
Christopher Cole
ce65abaecc Update byteorder to 1.x and bump our crate version now that this builds on rust 1.64.0 2022-10-02 23:19:44 -07:00
Christopher Cole
c4a9732fef Prefix unused parsing vars with _ to signal to the compiler that its intended 2022-10-02 23:04:19 -07:00
Christopher Cole
e1ba759253 Use a ParseError::EndianError rather than panicking 2022-10-02 23:02:43 -07:00
Christopher Cole
e604816c15 Replace usages of try with the ? operator 2022-10-02 23:02:07 -07:00
Christopher Cole
48e4313ce4 Use the dyn keyword to specify parse_symbol takes a ref to a Read trait object. 2022-10-02 22:43:27 -07:00
Christopher Cole
44654da0c6 Merge pull request #14 from Wilfred/patch-1
Vec<u8> values cannot be printed
2016-10-09 09:32:22 -07:00
Wilfred Hughes
a4416bc638 env is also unused 2016-10-08 11:00:30 -04:00
Wilfred Hughes
fa22515e06 Vec<u8> values cannot be printed
So show the debug format instead.
2016-10-08 00:03:13 -04:00
Christopher Cole
4141543ed9 Bump version to 0.0.10 2016-09-22 21:28:42 -07:00
Christopher Cole
0d3fc977d3 Merge pull request #12 from isra17/master
Fix NOBITS section parsing.
2016-09-22 21:16:55 -07:00
isra17
b48cf9088b Fix NOBITS section parsing.
Old behaviour was panicking when an ELF file has a .bss offset + size greater
than the file size.
2016-09-15 23:48:58 -04:00
Christopher Cole
8a31cdbff5 Merge pull request #11 from philipc/get_symbols
Add File::get_symbols()
2016-07-06 09:02:12 -07:00
Philip Craig
d957556a49 Add File::get_symbols() 2016-06-21 14:44:53 +10:00
Philip Craig
f889fad958 Use read_exact()
`take(len).read_to_end()` can read less `len` bytes.
2016-06-19 14:50:07 +10:00
Christopher Cole
e45bb844f6 Bump version to 0.0.9 2016-04-20 21:55:34 -07:00
Christopher Cole
2810b1b803 Move rust-readelf out into its own package 2016-04-20 21:03:18 -07:00
Christopher Cole
0a9f684c9b Bump version to 0.0.8 2016-04-06 14:01:13 -07:00
Christopher Cole
02863a2e9b Update README.md example to reflect reality 2016-04-06 14:00:24 -07:00
Christopher Cole
07f2242f59 Clean up compiler warnings
Intermediate parsing variables don't need to be mut.
2016-04-06 13:43:58 -07:00
Christopher Cole
66c5d77a46 Merge pull request #10 from jcreekmore/bug-fixes
Remove the read_u8!() macro
2016-04-06 13:43:12 -07:00
Jonathan Creekmore
a81e7e7b54 Remove the read_u8!() macro
The read_u8!() macro is unnecessary since there are not endianness
considers reading a u8. Additionally, the macro is broken because it
tries to specialize the read_u8 function in the ReadBytesExt trait
for LittleEndian and BigEndian which is not supported by that API.
2016-04-06 12:51:54 -05:00
Christopher Cole
e10b5fbbb8 Bump version to 0.0.7 2016-04-05 02:51:24 +00:00
Christopher Cole
91e8c87a15 Merge pull request #8 from jmgao/master
Remove convert::From<byteorder::Error> for ParseError.
2016-04-04 19:58:05 -07:00
Josh Gao
68aa81d5b0 Remove convert::From<byteorder::Error> for ParseError.
byteorder::Error doesn't seem to exist anymore.
2016-04-02 23:37:29 -07:00
Christopher Cole
7398e3e083 Bump version to 0.0.6 2016-01-12 03:51:08 +00:00
Christopher Cole
f4232021d9 Restrict byteorder dependency to 0.*
The simple "*" wildcard dependency is misleading and discouraged
by crates.io. Updating to a more realistic "0.*".
2016-01-12 03:49:56 +00:00
Christopher Cole
723532d61d Relicense under dual MIT/Apache-2.0
The Robigalia project wants to include rust-elf. Relicensing at
their behest.
2016-01-12 03:43:15 +00:00
Christopher Cole
51f32fb3df Merge pull request #5 from Columbus240/master
Remove empty first lines from *.rs files
2016-01-11 11:21:57 -08:00
Christopher Cole
0ce61a0ea9 Merge pull request #6 from softprops/fix_read_exact_error
this fixes a compiler error the the current stable version of rust
2016-01-09 20:57:28 -08:00
softprops
5a684b66e5 fixes read_exact error where crate defined trait implements a method now defined (in unstable form) in std lib with different signature 2015-12-27 14:45:57 +09:00
Stéphane P. Desarzens
80cff234e5 Remove empty first lines from *.rs files 2015-12-20 21:18:28 +01:00
Christopher Cole
265c6b076e Bump version to 0.0.5 2015-07-24 05:30:21 +00:00
Christopher Cole
a49eb2207e Fix typo from pull request #3
Section headers are located at shoff, not phoff.
2015-07-24 05:28:59 +00:00
Christopher Cole
a7e46b1818 Read section contents using Take and read_to_end 2015-07-24 05:27:15 +00:00
Christopher Cole
4ecb07d8c9 Merge pull request #3 from DiamondLovesYou/master
Update for newer Rust.
2015-07-23 13:22:57 -07:00
Richard Diamond
29507f31fe Extra derives. 2015-07-05 14:36:45 -05:00
Richard Diamond
f5398226d7 Accept multiple arguments from rust-readelf. 2015-06-29 06:04:37 -05:00
Richard Diamond
6be78a4657 Remove an unknown feature. 2015-06-29 05:45:59 -05:00
Richard Diamond
641cd177e5 Read header data from a io stream. 2015-06-29 05:45:09 -05:00
Richard Diamond
e5e60e6199 Update for newer Rust. 2015-06-29 05:38:59 -05:00
Christopher Cole
6a7dd76bbc Fix more build breakage from io/path deprecation 2015-02-21 12:18:54 -08:00
Christopher Cole
049e584cc8 Add link to documentation in root README 2015-02-09 20:53:52 -08:00
Christopher Cole
7a664b1e8e Remove stale #![feature(collections)] attribute 2015-02-09 20:21:17 -08:00
Christopher Cole
c2dd168fe6 Add types for ELF Symbols
Symbol encapsulates both Elf32_Sym and Elf64_Sym
2015-02-09 20:20:37 -08:00
Christopher Cole
e7ea33896e Remove unnecessary allocs from utils::get_string
The previous implementation would result in many unnecessary
duplications of the entire string table section data just to parse
out single strings.
2015-02-08 18:36:38 -08:00
Christopher Cole
1869d4515a Remove the io backing struct from the File struct
This allows for the modification and writing of ELF files
in addition to simple parsing.
2015-02-08 18:27:02 -08:00
Christopher Cole
60970e0798 Pass the underlying reader to utils::read_* macros
This is in preparation to removing the reader from the File
struct. The file struct should be independent of any backing
store to allow for the creation and modification of ELF files
in addition to simple parsing.
2015-02-08 18:19:23 -08:00
Christopher Cole
42aaf50b83 std::path -> std::old_path 2015-02-05 23:49:40 -08:00
Christopher Cole
c26011bd7e Add doc comments for ELF section header 2015-02-04 21:55:48 -08:00
Christopher Cole
08f70081a2 Add doc comments for ELF program header 2015-02-04 21:33:34 -08:00