This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
binary blob conversions/other blob questions
- From: Sergey Lapin <slapin at ossfans dot org>
- To: binutils at sourceware dot org
- Date: Thu, 19 Feb 2009 13:58:50 +0300
- Subject: binary blob conversions/other blob questions
Hi, all!
I have two questions, which are quite different subjects,
but they have a lot in common.
1. I'm in the middle of rewriting some binary blob (old closed
source kernel module) in C, and I'd like to make partial
replacement, i.e. I have a function in binary blob I want to
override in C.
I've managed to write a wrapper for all globals within blob and
using objcopy --localize-symbols,--redefine-symbols, I rename
symbols, making code within blob call my function instead of
kernel one, and then I can run kernel function there.
But now I need to replace a function within a blob, which
is called not only externally, but also internally.
Is it possible, at all? If yes, how could I achieve my target?
Source code to blob is lost long ago. Architecture is MIPS,
object format is ELF, unrelocated. I use binutils-2.17 there.
Also, I'm interested if it is possible to rename symbols within LD
scripts.
2. I have a closed source library, in .a (ar archive), in IAR format.
I need to link it against gcc-produced objects. It chokes a lot on
obsolete entries and tells about undefined symbols (all which are tried
within a library). Is it possible to convert a library to
GNU-compatible format? Architecture is ARM, object format is ELF. I use
binutils-2.18.50 and binutils-2.17
All the best,
S.