comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Size optimization for objects
Date: Thu, 11 Jul 2013 11:10:05 +0200
Date: 2013-07-11T11:10:05+02:00	[thread overview]
Message-ID: <b47b3dF6vrtU1@mid.individual.net> (raw)
In-Reply-To: <a15df517-37ed-46d4-bf2f-1268076b49c8@googlegroups.com>

On 13-07-10 13:58 , Rego, P. wrote:
> Output "bla.txt" of nm:

(For the record, I understand from your preceding message that this is
the output of "nm --print-size --size-sort bla.exe".)

> 00414176 ffbec001 D ___gl_locking_policy
> 00414175 ffbec001 D ___gl_queuing_policy
> 00414174 ffbec001 D ___gl_task_dispatching_policy

This is starting to look like a bug in your "nm". The three variables
above are clearly of size 1 octet (the addresses differ by 1 octet at
each step) but the "size" column is not 00000001.

An example where the size (of the first object) is evidently 2 octets
(I'm quoting these line pairs in address order, not in the original size
order):

> 00414b36 ffbec002 D _ada__exceptions__exception_traces__nlineXn
> 00414b38 ffbec004 D ___gnat_exception_actions_global_action

And 3 octets:

> 00414b41 ffbec003 D _system__stack_checking__multi_processor
> 00414b44 ffbec00c D _system__stack_checking__null_stack_info

And 4 octets:

> 00414b38 ffbec004 D ___gnat_exception_actions_global_action
> 00414b3c ffbec004 D ___gnat_exception_actions_initialized

In each case, in the "size" column, the last three hex digits show the
correct size, but the first five are "ffbec", clearly wrong for a size
value.

Sorting the whole listing into address order shows that the first five
hex digits of the "size" column behave in a systematic manner: the list
starts with 857 lines with "ffbff" in these digits, and all these
symbols are of type "t" or "T". The next line is type "D" and has
"ffbec" in these digits. I haven't tried to discover any rules for this,
since there is evidently a bug in your "nm", producing these incorrect
"size" values.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
      .      @       .


  reply	other threads:[~2013-07-11  9:10 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28 19:49 Size optimization for objects Rego, P.
2013-06-29  7:10 ` Georg Bauhaus
2013-07-01 13:56   ` Rego, P.
2013-07-01 16:49     ` G.B.
2013-06-29  9:48 ` Jack Daniels
2013-07-01 13:58   ` Rego, P.
2013-06-30 11:34 ` rrr.eee.27
2013-07-01 14:35   ` Rego, P.
2013-07-01 15:28     ` Niklas Holsti
2013-07-01 16:35       ` Rego, P.
2013-07-01 18:21         ` Niklas Holsti
2013-07-02 20:32           ` Rego, P.
2013-07-06 16:06             ` Niklas Holsti
2013-07-10 11:57               ` Rego, P.
2013-07-10 11:58                 ` Rego, P.
2013-07-11  9:10                   ` Niklas Holsti [this message]
2013-07-18 14:09                     ` Rego, P.
2013-07-18 14:10                       ` Rego, P.
2013-07-11  8:35                 ` Niklas Holsti
2013-07-12  0:35                   ` Randy Brukardt
2013-07-18 15:16                     ` Rego, P.
2013-07-18 15:12                   ` Rego, P.
2013-07-18 17:57                     ` Niklas Holsti
2013-07-19  5:02                     ` Randy Brukardt
2013-07-19 13:20                       ` Eryndlia Mavourneen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox