[gold][patch] Small code refactoring
Rafael Espindola
espindola@google.com
Sat Feb 14 17:17:00 GMT 2009
> One approach here would be to write a predicate is_elf_object which
> takes read_size and ehdr and returns whether it looks like ELF. Then if
> is_elf_object returns true, call make_elf_object.
The attached patch implements a small variation. is_elf_object calls
get_view and writes it back to the caller. With this I can remove the
duplicated call to gold_error in Archive::get_elf_object_for_member.
2009-02-14 Rafael Avila de Espindola <espindola@google.com>
* archive.cc (Archive::get_elf_object_for_member): Use is_elf_object.
* object.cc (is_elf_object): New.
* object.h (is_elf_object): New.
* readsyms.cc (Read_symbols::do_read_symbols): Use is_elf_object.
> Thanks for looking at this.
>
> Ian
>
Cheers,
--
Rafael Avila de Espindola
Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clean.patch
Type: text/x-patch
Size: 5122 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090214/3ff6a9fd/attachment.bin>
More information about the Binutils
mailing list