Patch to readelf...

scottb scottb@netwinder.org
Thu Aug 19 11:56:00 GMT 1999


Nick Clifton wrote:
> 
> I would like to accept this patch, but....
> 
>   * It is too ARM Linux specific.  For example the structure 'struct
>     user_fp' that you reference in several of your functions is not
>     defined in my i386 Linux environment.
> 
>   * Similarly I am worried that other platforms will not have the new
>     header files that you include (eg <sys/procfs.h>).
> 
>   * The code does not conform to the GNU coding standard.  In
>     particular you have lots of invocations of printf where there is
>     no space between the function name and the opening parenthesis,
>     plus in several places you have a brace at the end of a for
>     statement instead of all alone on the following line.
> 
>   * In several places function return values are ignored when they
>     need not be.
> 
> If you would like to tidy the patch up, I would be happy to review it
> again.

I'm sorry.  I knew this patch was not going to be up to snuff for
inclusion.  I was wondering if it was sufficiently interesting enough to
warrant further work.  I originally wrote this as a quick extension to
examine the core files while working on porting GDB.  I figured I'd ask
the people on the list if they though it worth pursuing, before doing
any further work.

I also have concerns about readelf.c getting very large and unmanageable
as expressed by Jakub.  In order to prevent that and to isolate
architecture specific code, it would be necessary to split stuff out
into a separate file, alter the makefile, etc.

If I remove the arm_* functions, is the remaining code still too Linux
specific?  I'm not familiar enough with other architechures to know if
the information in the notes is common enough for general use.

If people think it is worth pursuing, I'll happily tidy up the patch for
further review.

Scott
Scott


More information about the Binutils mailing list