All of lore.kernel.org
 help / color / mirror / Atom feed
* 0 function size
@ 2007-03-05 14:19 Alexander Sirotkin
  2007-03-05 16:20 ` Ralf Baechle
  2007-03-05 16:21 ` Rajat Jain
  0 siblings, 2 replies; 6+ messages in thread
From: Alexander Sirotkin @ 2007-03-05 14:19 UTC (permalink / raw)
  To: linux-mips

I'm trying to see the function sizes for some object file compiled for
MIPS. On x86 one can use objdump  or readelf to see the sizes, however
for same weird reason on MIPS these routines show 0 for all functions.

Any idea what I'm missing ?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 0 function size
  2007-03-05 14:19 0 function size Alexander Sirotkin
@ 2007-03-05 16:20 ` Ralf Baechle
  2007-03-05 16:28   ` Alexander Sirotkin
  2007-03-05 16:21 ` Rajat Jain
  1 sibling, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2007-03-05 16:20 UTC (permalink / raw)
  To: Alexander Sirotkin; +Cc: linux-mips

On Mon, Mar 05, 2007 at 04:19:18PM +0200, Alexander Sirotkin wrote:

> I'm trying to see the function sizes for some object file compiled for
> MIPS. On x86 one can use objdump  or readelf to see the sizes, however
> for same weird reason on MIPS these routines show 0 for all functions.
> 
> Any idea what I'm missing ?

Works fine here:

801f3f10 l     F .text  00000074 rekey_seq_generator
80327f2c l     O .data  00000028 rekey_work
80345dd0 l     F .init.text     00000020 seqgen_init
801f3fd0 l     F .text  000000f4 uuid_strategy
801f40c4 l     F .text  0000012c proc_do_uuid
801f42e0 l     F .text  0000012c extract_entropy_user
801f440c l     F .text  0000000c urandom_read
801f4418 l     F .text  000000fc random_write
801f4514 l     F .text  000001f4 random_ioctl
801f484c l     F .text  00000090 random_poll
801f4ac8 l     F .text  00000190 random_read
80327f64 l     O .data  00000004 sysctl_poolsize

So seems to be a defect with your particular toolchain or objdump or readelf.

  Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 0 function size
  2007-03-05 14:19 0 function size Alexander Sirotkin
  2007-03-05 16:20 ` Ralf Baechle
@ 2007-03-05 16:21 ` Rajat Jain
  2007-03-05 16:27   ` Ralf Baechle
  1 sibling, 1 reply; 6+ messages in thread
From: Rajat Jain @ 2007-03-05 16:21 UTC (permalink / raw)
  To: Alexander Sirotkin; +Cc: linux-mips

On 3/5/07, Alexander Sirotkin <demiourgos@gmail.com> wrote:
> I'm trying to see the function sizes for some object file compiled for
> MIPS. On x86 one can use objdump  or readelf to see the sizes, however
> for same weird reason on MIPS these routines show 0 for all functions.
>
> Any idea what I'm missing ?
>

Are you using a native compiler or a cross compiler?

If you are using a cross compiler, then you need to use the "cross
compiler" version of objdump / readelf  utilities as well. For
instance if you are using mips-linux-gcc to compile, then you need
mips-linux-readelf / mips-linux-objdump etc.

Thanks,

Rajat

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 0 function size
  2007-03-05 16:21 ` Rajat Jain
@ 2007-03-05 16:27   ` Ralf Baechle
  2007-03-06 11:06     ` Alexander Sirotkin
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2007-03-05 16:27 UTC (permalink / raw)
  To: Rajat Jain; +Cc: Alexander Sirotkin, linux-mips

On Mon, Mar 05, 2007 at 09:51:25PM +0530, Rajat Jain wrote:

> Are you using a native compiler or a cross compiler?
> 
> If you are using a cross compiler, then you need to use the "cross
> compiler" version of objdump / readelf  utilities as well. For
> instance if you are using mips-linux-gcc to compile, then you need
> mips-linux-readelf / mips-linux-objdump etc.

In general your're right but for this particular purpose for example an
i386-linux-objdump will do the job for 32-bit big and little endian
MIPS ELF.  It will - depending on the exact binutils configuration - fail
with an error message for 64-bit ELF.

  Ralf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 0 function size
  2007-03-05 16:20 ` Ralf Baechle
@ 2007-03-05 16:28   ` Alexander Sirotkin
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander Sirotkin @ 2007-03-05 16:28 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

On 3/5/07, Ralf Baechle <ralf@linux-mips.org> wrote:
> On Mon, Mar 05, 2007 at 04:19:18PM +0200, Alexander Sirotkin wrote:
>
> > I'm trying to see the function sizes for some object file compiled for
> > MIPS. On x86 one can use objdump  or readelf to see the sizes, however
> > for same weird reason on MIPS these routines show 0 for all functions.
> >
> > Any idea what I'm missing ?
>
> Works fine here:
>
> 801f3f10 l     F .text  00000074 rekey_seq_generator
> 80327f2c l     O .data  00000028 rekey_work
> 80345dd0 l     F .init.text     00000020 seqgen_init
> 801f3fd0 l     F .text  000000f4 uuid_strategy
> 801f40c4 l     F .text  0000012c proc_do_uuid
> 801f42e0 l     F .text  0000012c extract_entropy_user
> 801f440c l     F .text  0000000c urandom_read
> 801f4418 l     F .text  000000fc random_write
> 801f4514 l     F .text  000001f4 random_ioctl
> 801f484c l     F .text  00000090 random_poll
> 801f4ac8 l     F .text  00000190 random_read
> 80327f64 l     O .data  00000004 sysctl_poolsize
>
> So seems to be a defect with your particular toolchain or objdump or readelf.
Yeah, it is indeed a problem with the particular toolchain I was using. Thanks.
>
>   Ralf
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 0 function size
  2007-03-05 16:27   ` Ralf Baechle
@ 2007-03-06 11:06     ` Alexander Sirotkin
  0 siblings, 0 replies; 6+ messages in thread
From: Alexander Sirotkin @ 2007-03-06 11:06 UTC (permalink / raw)
  To: linux-mips

On 3/5/07, Ralf Baechle <ralf@linux-mips.org> wrote:
> On Mon, Mar 05, 2007 at 09:51:25PM +0530, Rajat Jain wrote:
>
> > Are you using a native compiler or a cross compiler?
> >
> > If you are using a cross compiler, then you need to use the "cross
> > compiler" version of objdump / readelf  utilities as well. For
> > instance if you are using mips-linux-gcc to compile, then you need
> > mips-linux-readelf / mips-linux-objdump etc.
>
> In general your're right but for this particular purpose for example an
> i386-linux-objdump will do the job for 32-bit big and little endian
> MIPS ELF.  It will - depending on the exact binutils configuration - fail
> with an error message for 64-bit ELF.
>
>   Ralf
>

Apparently it is a bug in MIPS SDE toolchain, even in the latest version 6.05.
With emdebian toolchain it works just fine.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-03-06 11:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-05 14:19 0 function size Alexander Sirotkin
2007-03-05 16:20 ` Ralf Baechle
2007-03-05 16:28   ` Alexander Sirotkin
2007-03-05 16:21 ` Rajat Jain
2007-03-05 16:27   ` Ralf Baechle
2007-03-06 11:06     ` Alexander Sirotkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.