[PATCH] readelf: Warn zero-sized relocation sections

Nick Clifton nickc@redhat.com
Mon Apr 27 11:24:37 GMT 2020


Hi Jan,

> Apart from that, besides noticing a few seemingly unrelated
> changes, is __attribute__((weak)) portable enough to be used
> in binutils? (Sorry, didn't check if there are pre-existing
> instances.)

Ah yes - I meant to mention that.  I am not sure that it is used elsewhere.
The only other places where I could find it being used were in testsuite
cases.  Also there was no define of ATTRIBUTE_WEAK in include/ansidecl.h 
which surprised me.  So possible it is not as portable as I hoped.

The change is not unrelated however, as I wanted to override the warn()
function provided by elf-comm.c and instead use one supplied in readelf.c.
Doing this allowed me to avoid changing lots of code in the files in the
binutils/ sub-directory that use warn() normally.

So I am still undecided as to whether using this attribute is the best
thing to do.

Cheers
  Nick





More information about the Binutils mailing list