This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can objdump show friendly symbolic function name?


On 07/20/2010 09:59 AM, Maciej W. Rozycki wrote:
On Tue, 20 Jul 2010, David Daney wrote:

I would note that GCC/Binutils has for quite some time had the -mxgot option
(or a variant thereof), which lifts the got size restriction at the expense of
less efficient code.  I would be inclined to recommend using it instead of
cooking up a solution for multiple GOTs within a single function.  It has the
advantage that it exists and works today.

Support for large GOT has been defined since the beginning of the MIPS ELF ABI (GOTHI16/GOTLO16 relocations etc.), but I have been told it requires all the dependent libraries (down to libc) to be rebuilt (never analysed that myself), at which point you have to rebuild the whole system or create another set of multilibs. Given a large GOT has a considerable performance hit, it does not sound like a good idea to make all the programs in a system suffer to serve the few offenders.

That is not the case.


Case in point (before multi-got bugs were fixed), I had reliably working on mipsel-linux (o32):

Application: no -mxgot
libc.so.6/libpthread.so.???: no -mxgot
other .so files: no -mxgot.
libgcj.so.???: -mxgot.


As far as I know, you can mix -mxgot and non -mxgot executables and shared objects.



It might be nice to add a function attribute that lets us turn -mxgot on and
off on a per function basis, instead of the current per compilation unit basis
of today.

As I say the biggest concern are whole programs and not single functions. Feel free to implement large GOT support such that mixing objects or even single functions in a link is possible. How would you determine which function to annotate with the attribute -- manually by trial and error? It doesn't seem that would scale well to me. We've been through it with the -G option.


-G does complicate things, but IIRC Linux userspace ABIs all have -G 0, so there is no small data. Of course for systems with small data you would have to consider this.


David Daney


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]