comp.lang.ada
 help / color / mirror / Atom feed
* It's been a while...
@ 2003-05-29 21:18 Luke A. Guest
  2003-05-29 21:27 ` Martin Dowie
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Luke A. Guest @ 2003-05-29 21:18 UTC (permalink / raw)


Hi,

I learned Ada at University around 1995 and I've been interested in
getting back into it. Now, I have a simple "hello" app and it is huge.
Now, I don't want to have a load of people telling me not to judge Ada on
the size, but I really want to know how to get the app size down. The app
is:

-rwxr-xr-x    1 laguest  users      200492 2003-05-29 22:16 hello

This is an example program from the sources, compiled with:

	gnatmake -O3

and Ihave used "strip" to get rid of the debug symbols, and the app size
is:

-rwxr-xr-x    1 laguest  users       73292 2003-05-29 22:17 hello

but, if I do this:

	strings hello, I get the following:

/lib/ld-linux.so.2
libc.so.6
strcpy
waitpid
stdout
utime
ungetc
sigemptyset
getenv
getpid
memcpy
setvbuf
readlink
feof
malloc
isatty
__frame_state_for
readdir
fflush
putenv
abort
fprintf
strcat
__deregister_frame_info
fseek
stdin
mktime
ferror
strstr
strncpy
unlink
realloc
_IO_getc
fork
execv
sigaction
fread
symlink
localtime
memset
clearerr
getppid
tcgetattr
ttyname
getcwd
fgetc
sprintf
fclose
scanf
stderr
mkstemp
fputc
localtime_r
fwrite
__xstat
rewind
freopen
__fxstat
fopen
atoi
_IO_putc
fileno
_IO_stdin_used
_exit
gmtime
__libc_start_main
__register_frame_info_table
tcsetattr
__register_frame_info
free
__gnat_handler_installed
__gl_wc_encoding
__dummy
program_error
__gl_unreserve_all_interrupts
gnat_argc
gnat_envp
__gl_exception_tracebacks
__gl_restrictions
__gl_main_priority
__gl_locking_policy
__gl_task_dispatching_policy
system__soft_links__get_machine_state_addr
max_path_len
gnat_argv
__gl_zero_cost_exceptions
__gl_queuing_policy
__gl_time_slice_val
gnat_exit_status
constraint_error
storage_error
__gmon_start__
GLIBC_2.1
GLIBC_2.0
PTRh
j j j jbj
(WVS
        ~&V
gfff
gfff
8C9M
\WVS
(WVS
0WVS
PRQh
PRQh
PRQh
PRQS
TWVS
gfff
gfff
\WVS
$WVS
8_t5
8_u;
j;h8z
t!VS
t_WV
t*WS
RPh<
RPht
RPh<
RPht
RPh<
RPht
RPh<
RPh<
RPht
RPhL
RPh<
RPht
RPhL
RPh<
RPht
RPhL
RPh<
RPht
RPhL
RPh<
RPht
RPhL
RPh<
RPht
RPh<
RPht
RPh<
RPh<
RPht
RPh<
RPht
RPh<
RPht
RPh<
RPht
9C0~
RPh<
RPht
9P0~
RPh<
RPht
t29u
RPh<
RPht
9G,~
G,PVW
RPht
RPht
9s0~
9s0|
RPhL
RPh<
RPht
RPh<
RPht
9s,tiS
9s,~    S
9s,}%
9s,|
9s,u
RPh<
RPht
RPh<
RPht
RPh<
RPht
RPh<
RPht
RPhL
RPh<
RPht
RPhL
RPht
t!VS
t_WV
t*WS
$WVS
WVSj
jGh(}
RPh<
RPh<
RPht
RPh<
RPht
 WVS
RPh<
RPh<
RPhL
j8PR
RPh<
RPh<
RPh<
RPht
RPh<
RPht
 WVS
jzhd
 WVS
$hd
 WVS
 WVS
$h|1
$hl5
j.h%
j7h%
j@h%
<Pu$
TWVS
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
RPhL
4WVS
WVSf
,WVS
 WVS
PRQS
Pj/V
80t-@80t(@80t#@
80t-@80t(@80t#@
80t-@80t(@80t#@
80t-@80t(@80t#@
8(t-@8(t(@8(t#@
8"t+B8"t&B8"t!B
BB+U
8(t-@8(t(@8(t#@
t}</u
80t-@80t(@80t#@
80t-@80t(@80t#@
8*t-B8*t(B8*t#B
BB+U
<:t
80t-@80t(@80t#@
8"t+B8"t&B8"t!B
80t-@80t(@80t#@
81t-A81t(A81t#A
8(t-@8(t(@8(t#@
81t-A81t(A81t#A
8(t-@8(t(@8(t#@
?/t<
PRQV
PRQV
tD9U
t%VWG
8&t+F8&t&F8&t!F
_ada_hello
nnvvnnnvnnnnnvvvvvvnvvvnvnnvnnnvnvvnnnnnnvvvnnnnvvnn
hello
access check failed
access parameter is null
discriminant check failed
divide by zero
explicit raise
index check failed
invalid data
length check failed
overflow check failed
partition check failed
range check failed
tag check failed
access before elaboration
accessibility check failed
all guards closed
finalize raised exception
misaligned address value
missing return
potentially blocking operation
stubbed subprogram called
unchecked union restriction
empty storage pool
infinite recursion
object too large
restriction violation
URC_NO_REASONURC_FOREIGN_EXCEPTION_CAUGHTURC_PHASE2_ERRORURC_PHASE1_ERRORURC_NORMAL_STOPURC_END_OF_STACKURC_HANDLER_FOUNDURC_INSTALL_CONTEXTURC_CONTINUE_UNWIND
0123456789abcdefException name:
Message:
PID:
Call stack traceback locations:
a-except.adb
bad exception occurrence in stream input
PID:Exception raised
Execution terminated by abort of environment task
raised
Execution terminated by unhandled exception
a-finali.ads
FALSETRUE
unknown tagged type:
@IN_FILEOUT_FILEAPPEND_FILE
LOWER_CASEUPPER_CASE
a-textio.ads
s-fileio.adb:166
s-fileio.adb:168s-fileio.adb:477s-fileio.adb:179s-fileio.adb:181s-fileio.adb:639a-textio.adb:396a-textio.adb:449a-textio.adb:501a-textio.adb:503a-textio.adb:553a-textio.adb:556a-textio.adb:617a-textio.adb:712a-textio.adb
a-textio.adb:896a-textio.adb:901a-textio.adb:983a-textio.adb:1000
a-textio.adb:1110a-textio.adb:1130a-textio.adb:1188a-textio.adb:1211a-textio.adb:1265a-textio.adb:1281a-textio.adb:1353a-textio.adb:1472a-textio.adb:1559a-textio.adb:1664a-textio.adb:1707a-textio.adb:1725a-textio.adb:1732a-textio.adb:1741
%IN_FILEINOUT_FILEOUT_FILEAPPEND_FILE
%YESNONONE
s-fileio.adb
s-fileio.adb:122
s-fileio.adb:155s-fileio.adb:166s-fileio.adb:168s-fileio.adb:179s-fileio.adb:181s-fileio.adb:271s-fileio.adb:284s-fileio.adb:298s-fileio.adb:374s-fileio.adb:477s-fileio.adb:508s-fileio.adb:536s-fileio.adb:542s-fileio.adb:639s-fileio.adb:652s-fileio.adb:709shared
yesnos-fileio.adb:743s-fileio.adb:763s-fileio.adb:769s-fileio.adb:798s-fileio.adb:828s-fileio.adb:869s-fileio.adb:889s-fileio.adb:891s-fileio.adb:934s-fileio.adb:937s-fileio.adb:940s-fileio.adb:955s-fileio.adb:989s-fileio.adb:1012
s-fileio.adb:1037
s-finimp.ads
s-stratt.adb:458
s-stratt.adb:440s-stratt.adb:422s-stratt.adb:404s-stratt.adb:386s-stratt.adb:368s-stratt.adb:350s-stratt.adb:332s-stratt.adb:314s-stratt.adb:296s-stratt.adb:278s-stratt.adb:260s-stratt.adb:242s-stratt.adb:224s-stratt.adb:206s-stratt.adb:188s-stratt.adb:170s-stratt.adb:152s-stratt.adb:134s-finimp.adb
 raised during finalization
exception
s-finroo.ads
s-finroo.adb
EAXECXEDXEBXESPEBPESIEDI
UWORDBYTE
        CONSTRAINT_ERROR
PROGRAM_ERROR
STORAGE_ERROR
TASKING_ERROR
_ABORT_SIGNAL
NUMERIC_ERROR
RM_CONVENTIONEVERY_RAISEUNHANDLED_RAISE
s-stratt.adb:134
s-stratt.adb:152
s-stratt.adb:170s-stratt.adb:188s-stratt.adb:206s-stratt.adb:224s-stratt.adb:242s-stratt.adb:260
s-stratt.adb:278s-stratt.adb:296s-stratt.adb:314s-stratt.adb:332s-stratt.adb:350s-stratt.adb:368s-stratt.adb:386s-stratt.adb:404s-stratt.adb:422s-stratt.adb:440s-stratt.adb:458main_task
object too large
heap exhausted
lib*.a
%s%c%s
%s-%d-%d
GNAT-XXXXXX
TMPDIR
/tmp/gnat-XXXXXX
%s/gnat-XXXXXX
%s=%s
PATH
a-init.c
SIGSEGV
stack overflow (or erroneous memory access)
SIGBUS
SIGFPE
unhandled signal
GNAT_STACK_LIMIT
s-stache.adb:172
stack overflow detected
GNAT Version: 3.15p  (20020523)_ada_hello
q#*a
^X7,
{_      uD{
divide by zero
explicit raise
invalid data
explicit raise
invalid data
missing return
explicit raise
ADA.FINALIZATION.LIST_CONTROLLER.SIMPLE_LIST_CONTROLLER
ADA.FINALIZATION.LIST_CONTROLLER.LIST_CONTROLLER
ADA.FINALIZATION.CONTROLLED
ADA.FINALIZATION.LIMITED_CONTROLLED
ADA.IO_EXCEPTIONS.STATUS_ERROR
ADA.IO_EXCEPTIONS.MODE_ERROR
ADA.IO_EXCEPTIONS.NAME_ERROR
ADA.IO_EXCEPTIONS.USE_ERROR
ADA.IO_EXCEPTIONS.DEVICE_ERROR
ADA.IO_EXCEPTIONS.END_ERROR
ADA.IO_EXCEPTIONS.DATA_ERROR
ADA.IO_EXCEPTIONS.LAYOUT_ERROR
ADA.STREAMS.ROOT_STREAM_TYPE
ADA.TAGS.TAG_ERROR
FALSETRUE
ADA.TEXT_IO.TEXT_AFCB
*stderr
*stdin
*stdout
%YESNONONE
SYSTEM.FILE_CONTROL_BLOCK.AFCB
SYSTEM.FILE_IO.FILE_IO_CLEAN_UP_TYPE
SYSTEM.FINALIZATION_IMPLEMENTATION.LIMITED_RECORD_CONTROLLER
SYSTEM.FINALIZATION_IMPLEMENTATION.RECORD_CONTROLLER
SYSTEM.FINALIZATION_ROOT.EMPTY_ROOT_CONTROLLED
SYSTEM.FINALIZATION_ROOT.ROOT_CONTROLLED
PROGRAM_ERROR
STORAGE_ERROR
TASKING_ERROR
_ABORT_SIGNAL
NUMERIC_ERROR
n
G. A.$B.(H.

Now, surely the app doesn't need this info and it must be taking up a lot
of space. Do I need to go into the linker scripts to strip this info out?

Thanks,
Luke.






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

* Re: It's been a while...
  2003-05-29 21:18 It's been a while Luke A. Guest
@ 2003-05-29 21:27 ` Martin Dowie
  2003-05-29 22:19   ` Luke A. Guest
  2003-05-29 22:22   ` Luke A. Guest
  2003-05-30  2:13 ` Steve
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 12+ messages in thread
From: Martin Dowie @ 2003-05-29 21:27 UTC (permalink / raw)


"Luke A. Guest" <laguest@__n_o_s_p_a_m__abyss2.demon.co.uk______> wrote in
message
news:pan.2003.05.29.21.18.46.518854@__n_o_s_p_a_m__abyss2.demon.co.uk______...
> Hi,
>
> I learned Ada at University around 1995 and I've been interested in
> getting back into it. Now, I have a simple "hello" app and it is huge.
> Now, I don't want to have a load of people telling me not to judge Ada on
> the size, but I really want to know how to get the app size down. The app
> is:
>
> -rwxr-xr-x    1 laguest  users      200492 2003-05-29 22:16 hello
>
> This is an example program from the sources, compiled with:
>
> gnatmake -O3

You could try the binder option "-shared" and link to a shared runtime,
as opposed to binding one in staticly..





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

* Re: It's been a while...
  2003-05-29 21:27 ` Martin Dowie
@ 2003-05-29 22:19   ` Luke A. Guest
  2003-05-30  7:43     ` Martin Dowie
  2003-05-29 22:22   ` Luke A. Guest
  1 sibling, 1 reply; 12+ messages in thread
From: Luke A. Guest @ 2003-05-29 22:19 UTC (permalink / raw)


> You could try the binder option "-shared" and link to a shared runtime,
> as opposed to binding one in staticly..

Yes I could...and I could also get rid of the extra crap that surely isn't
needed. Are you telling me that all those strings in the binary *are*
required? I don't think so.

Thanks,
Luke.




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

* Re: It's been a while...
  2003-05-29 21:27 ` Martin Dowie
  2003-05-29 22:19   ` Luke A. Guest
@ 2003-05-29 22:22   ` Luke A. Guest
  1 sibling, 0 replies; 12+ messages in thread
From: Luke A. Guest @ 2003-05-29 22:22 UTC (permalink / raw)


On Thu, 29 May 2003 21:27:32 +0000, Martin Dowie wrote:

> You could try the binder option "-shared" and link to a shared runtime,
> as opposed to binding one in staticly..

Sorry, are these strings there due to the linkage of shared libs? If
so...ELF really should use indices rather than strings...bad, bad, bad :-(

Luke




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

* Re: It's been a while...
  2003-05-29 21:18 It's been a while Luke A. Guest
  2003-05-29 21:27 ` Martin Dowie
@ 2003-05-30  2:13 ` Steve
  2003-05-30  2:54   ` Wesley Groleau
  2003-05-30  4:52 ` Re; " tmoran
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Steve @ 2003-05-30  2:13 UTC (permalink / raw)


You might try adding: pragma Discard_Names to your source.

If you haven't already checked, look for settings in the GNAT User's Guide
and the GNAT Reference Manual for hints on how to reduce the size of the
executable.

It also looks like full exception traceback information is included.  You
can probably turn that off as well (if you really want to).

Steve
(The Duck)

"Luke A. Guest" <laguest@__n_o_s_p_a_m__abyss2.demon.co.uk______> wrote in
message
news:pan.2003.05.29.21.18.46.518854@__n_o_s_p_a_m__abyss2.demon.co.uk______.
..
> Hi,
>
> I learned Ada at University around 1995 and I've been interested in
> getting back into it. Now, I have a simple "hello" app and it is huge.
> Now, I don't want to have a load of people telling me not to judge Ada on
> the size, but I really want to know how to get the app size down. The app
> is:
>
> -rwxr-xr-x    1 laguest  users      200492 2003-05-29 22:16 hello
>
> This is an example program from the sources, compiled with:
>
> gnatmake -O3
>
> and Ihave used "strip" to get rid of the debug symbols, and the app size
> is:
>
> -rwxr-xr-x    1 laguest  users       73292 2003-05-29 22:17 hello
>
> but, if I do this:
>
> strings hello, I get the following:
>
> /lib/ld-linux.so.2
> libc.so.6
> strcpy
> waitpid
> stdout
> utime
> ungetc
> sigemptyset
> getenv
> getpid
> memcpy
> setvbuf
> readlink
> feof
> malloc
> isatty
> __frame_state_for
> readdir
> fflush
> putenv
> abort
> fprintf
> strcat
> __deregister_frame_info
> fseek
> stdin
> mktime
> ferror
> strstr
> strncpy
> unlink
> realloc
> _IO_getc
> fork
> execv
> sigaction
> fread
> symlink
> localtime
> memset
> clearerr
> getppid
> tcgetattr
> ttyname
> getcwd
> fgetc
> sprintf
> fclose
> scanf
> stderr
> mkstemp
> fputc
> localtime_r
> fwrite
> __xstat
> rewind
> freopen
> __fxstat
> fopen
> atoi
> _IO_putc
> fileno
> _IO_stdin_used
> _exit
> gmtime
> __libc_start_main
> __register_frame_info_table
> tcsetattr
> __register_frame_info
> free
> __gnat_handler_installed
> __gl_wc_encoding
> __dummy
> program_error
> __gl_unreserve_all_interrupts
> gnat_argc
> gnat_envp
> __gl_exception_tracebacks
> __gl_restrictions
> __gl_main_priority
> __gl_locking_policy
> __gl_task_dispatching_policy
> system__soft_links__get_machine_state_addr
> max_path_len
> gnat_argv
> __gl_zero_cost_exceptions
> __gl_queuing_policy
> __gl_time_slice_val
> gnat_exit_status
> constraint_error
> storage_error
> __gmon_start__
> GLIBC_2.1
> GLIBC_2.0
> PTRh
> j j j jbj
> (WVS
>         ~&V
> gfff
> gfff
> 8C9M
> \WVS
> (WVS
> 0WVS
> PRQh
> PRQh
> PRQh
> PRQS
> TWVS
> gfff
> gfff
> \WVS
> $WVS
> 8_t5
> 8_u;
> j;h8z
> t!VS
> t_WV
> t*WS
> RPh<
> RPht
> RPh<
> RPht
> RPh<
> RPht
> RPh<
> RPh<
> RPht
> RPhL
> RPh<
> RPht
> RPhL
> RPh<
> RPht
> RPhL
> RPh<
> RPht
> RPhL
> RPh<
> RPht
> RPhL
> RPh<
> RPht
> RPh<
> RPht
> RPh<
> RPh<
> RPht
> RPh<
> RPht
> RPh<
> RPht
> RPh<
> RPht
> 9C0~
> RPh<
> RPht
> 9P0~
> RPh<
> RPht
> t29u
> RPh<
> RPht
> 9G,~
> G,PVW
> RPht
> RPht
> 9s0~
> 9s0|
> RPhL
> RPh<
> RPht
> RPh<
> RPht
> 9s,tiS
> 9s,~    S
> 9s,}%
> 9s,|
> 9s,u
> RPh<
> RPht
> RPh<
> RPht
> RPh<
> RPht
> RPh<
> RPht
> RPhL
> RPh<
> RPht
> RPhL
> RPht
> t!VS
> t_WV
> t*WS
> $WVS
> WVSj
> jGh(}
> RPh<
> RPh<
> RPht
> RPh<
> RPht
>  WVS
> RPh<
> RPh<
> RPhL
> j8PR
> RPh<
> RPh<
> RPh<
> RPht
> RPh<
> RPht
>  WVS
> jzhd
>  WVS
> $hd
>  WVS
>  WVS
> $h|1
> $hl5
> j.h%
> j7h%
> j@h%
> <Pu$
> TWVS
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> RPhL
> 4WVS
> WVSf
> ,WVS
>  WVS
> PRQS
> Pj/V
> 80t-@80t(@80t#@
> 80t-@80t(@80t#@
> 80t-@80t(@80t#@
> 80t-@80t(@80t#@
> 8(t-@8(t(@8(t#@
> 8"t+B8"t&B8"t!B
> BB+U
> 8(t-@8(t(@8(t#@
> t}</u
> 80t-@80t(@80t#@
> 80t-@80t(@80t#@
> 8*t-B8*t(B8*t#B
> BB+U
> <:t
> 80t-@80t(@80t#@
> 8"t+B8"t&B8"t!B
> 80t-@80t(@80t#@
> 81t-A81t(A81t#A
> 8(t-@8(t(@8(t#@
> 81t-A81t(A81t#A
> 8(t-@8(t(@8(t#@
> ?/t<
> PRQV
> PRQV
> tD9U
> t%VWG
> 8&t+F8&t&F8&t!F
> _ada_hello
> nnvvnnnvnnnnnvvvvvvnvvvnvnnvnnnvnvvnnnnnnvvvnnnnvvnn
> hello
> access check failed
> access parameter is null
> discriminant check failed
> divide by zero
> explicit raise
> index check failed
> invalid data
> length check failed
> overflow check failed
> partition check failed
> range check failed
> tag check failed
> access before elaboration
> accessibility check failed
> all guards closed
> finalize raised exception
> misaligned address value
> missing return
> potentially blocking operation
> stubbed subprogram called
> unchecked union restriction
> empty storage pool
> infinite recursion
> object too large
> restriction violation
>
URC_NO_REASONURC_FOREIGN_EXCEPTION_CAUGHTURC_PHASE2_ERRORURC_PHASE1_ERRORURC
_NORMAL_STOPURC_END_OF_STACKURC_HANDLER_FOUNDURC_INSTALL_CONTEXTURC_CONTINUE
_UNWIND
> 0123456789abcdefException name:
> Message:
> PID:
> Call stack traceback locations:
> a-except.adb
> bad exception occurrence in stream input
> PID:Exception raised
> Execution terminated by abort of environment task
> raised
> Execution terminated by unhandled exception
> a-finali.ads
> FALSETRUE
> unknown tagged type:
> @IN_FILEOUT_FILEAPPEND_FILE
> LOWER_CASEUPPER_CASE
> a-textio.ads
> s-fileio.adb:166
>
s-fileio.adb:168s-fileio.adb:477s-fileio.adb:179s-fileio.adb:181s-fileio.adb
:639a-textio.adb:396a-textio.adb:449a-textio.adb:501a-textio.adb:503a-textio
.adb:553a-textio.adb:556a-textio.adb:617a-textio.adb:712a-textio.adb
> a-textio.adb:896a-textio.adb:901a-textio.adb:983a-textio.adb:1000
>
a-textio.adb:1110a-textio.adb:1130a-textio.adb:1188a-textio.adb:1211a-textio
.adb:1265a-textio.adb:1281a-textio.adb:1353a-textio.adb:1472a-textio.adb:155
9a-textio.adb:1664a-textio.adb:1707a-textio.adb:1725a-textio.adb:1732a-texti
o.adb:1741
> %IN_FILEINOUT_FILEOUT_FILEAPPEND_FILE
> %YESNONONE
> s-fileio.adb
> s-fileio.adb:122
>
s-fileio.adb:155s-fileio.adb:166s-fileio.adb:168s-fileio.adb:179s-fileio.adb
:181s-fileio.adb:271s-fileio.adb:284s-fileio.adb:298s-fileio.adb:374s-fileio
.adb:477s-fileio.adb:508s-fileio.adb:536s-fileio.adb:542s-fileio.adb:639s-fi
leio.adb:652s-fileio.adb:709shared
>
yesnos-fileio.adb:743s-fileio.adb:763s-fileio.adb:769s-fileio.adb:798s-filei
o.adb:828s-fileio.adb:869s-fileio.adb:889s-fileio.adb:891s-fileio.adb:934s-f
ileio.adb:937s-fileio.adb:940s-fileio.adb:955s-fileio.adb:989s-fileio.adb:10
12
> s-fileio.adb:1037
> s-finimp.ads
> s-stratt.adb:458
>
s-stratt.adb:440s-stratt.adb:422s-stratt.adb:404s-stratt.adb:386s-stratt.adb
:368s-stratt.adb:350s-stratt.adb:332s-stratt.adb:314s-stratt.adb:296s-stratt
.adb:278s-stratt.adb:260s-stratt.adb:242s-stratt.adb:224s-stratt.adb:206s-st
ratt.adb:188s-stratt.adb:170s-stratt.adb:152s-stratt.adb:134s-finimp.adb
>  raised during finalization
> exception
> s-finroo.ads
> s-finroo.adb
> EAXECXEDXEBXESPEBPESIEDI
> UWORDBYTE
>         CONSTRAINT_ERROR
> PROGRAM_ERROR
> STORAGE_ERROR
> TASKING_ERROR
> _ABORT_SIGNAL
> NUMERIC_ERROR
> RM_CONVENTIONEVERY_RAISEUNHANDLED_RAISE
> s-stratt.adb:134
> s-stratt.adb:152
>
s-stratt.adb:170s-stratt.adb:188s-stratt.adb:206s-stratt.adb:224s-stratt.adb
:242s-stratt.adb:260
>
s-stratt.adb:278s-stratt.adb:296s-stratt.adb:314s-stratt.adb:332s-stratt.adb
:350s-stratt.adb:368s-stratt.adb:386s-stratt.adb:404s-stratt.adb:422s-stratt
.adb:440s-stratt.adb:458main_task
> object too large
> heap exhausted
> lib*.a
> %s%c%s
> %s-%d-%d
> GNAT-XXXXXX
> TMPDIR
> /tmp/gnat-XXXXXX
> %s/gnat-XXXXXX
> %s=%s
> PATH
> a-init.c
> SIGSEGV
> stack overflow (or erroneous memory access)
> SIGBUS
> SIGFPE
> unhandled signal
> GNAT_STACK_LIMIT
> s-stache.adb:172
> stack overflow detected
> GNAT Version: 3.15p  (20020523)_ada_hello
> q#*a
> ^X7,
> {_      uD{
> divide by zero
> explicit raise
> invalid data
> explicit raise
> invalid data
> missing return
> explicit raise
> ADA.FINALIZATION.LIST_CONTROLLER.SIMPLE_LIST_CONTROLLER
> ADA.FINALIZATION.LIST_CONTROLLER.LIST_CONTROLLER
> ADA.FINALIZATION.CONTROLLED
> ADA.FINALIZATION.LIMITED_CONTROLLED
> ADA.IO_EXCEPTIONS.STATUS_ERROR
> ADA.IO_EXCEPTIONS.MODE_ERROR
> ADA.IO_EXCEPTIONS.NAME_ERROR
> ADA.IO_EXCEPTIONS.USE_ERROR
> ADA.IO_EXCEPTIONS.DEVICE_ERROR
> ADA.IO_EXCEPTIONS.END_ERROR
> ADA.IO_EXCEPTIONS.DATA_ERROR
> ADA.IO_EXCEPTIONS.LAYOUT_ERROR
> ADA.STREAMS.ROOT_STREAM_TYPE
> ADA.TAGS.TAG_ERROR
> FALSETRUE
> ADA.TEXT_IO.TEXT_AFCB
> *stderr
> *stdin
> *stdout
> %YESNONONE
> SYSTEM.FILE_CONTROL_BLOCK.AFCB
> SYSTEM.FILE_IO.FILE_IO_CLEAN_UP_TYPE
> SYSTEM.FINALIZATION_IMPLEMENTATION.LIMITED_RECORD_CONTROLLER
> SYSTEM.FINALIZATION_IMPLEMENTATION.RECORD_CONTROLLER
> SYSTEM.FINALIZATION_ROOT.EMPTY_ROOT_CONTROLLED
> SYSTEM.FINALIZATION_ROOT.ROOT_CONTROLLED
> PROGRAM_ERROR
> STORAGE_ERROR
> TASKING_ERROR
> _ABORT_SIGNAL
> NUMERIC_ERROR
> n
> G. A.$B.(H.
>
> Now, surely the app doesn't need this info and it must be taking up a lot
> of space. Do I need to go into the linker scripts to strip this info out?
>
> Thanks,
> Luke.
>
>
>





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

* Re: It's been a while...
  2003-05-30  2:13 ` Steve
@ 2003-05-30  2:54   ` Wesley Groleau
  0 siblings, 0 replies; 12+ messages in thread
From: Wesley Groleau @ 2003-05-30  2:54 UTC (permalink / raw)


Steve quoted:

 > [snip]
 > GLIBC_2.1
 > GLIBC_2.0
 > PTRh
 > j j j jbj
 > (WVS
 >         ~&V
 > gfff
 > gfff
 > 8C9M
 > \WVS
 > (WVS
 > 0WVS
 > PRQh
 > PRQh
 > PRQh
 > [snip]

It was unnecessary the first time for getting
the point across, and certainly not worth quoting.




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

* Re; It's been a while...
  2003-05-29 21:18 It's been a while Luke A. Guest
  2003-05-29 21:27 ` Martin Dowie
  2003-05-30  2:13 ` Steve
@ 2003-05-30  4:52 ` tmoran
  2003-05-30 10:04   ` Georg Bauhaus
  2003-05-30  9:03 ` Preben Randhol
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: tmoran @ 2003-05-30  4:52 UTC (permalink / raw)


>         strings hello, I get the following:
>
> /lib/ld-linux.so.2
> libc.so.6
> ...  436 or so additional lines we didn't need to see
> Now, surely the app doesn't need this info and it must be taking up a lot
> of space. Do I need to go into the linker scripts to strip this info out?
  If you take a look at the "strings" junk you posted, you will note it
is about 7K, which is not "a lot of space" out of 73292.  So getting rid
of it isn't going to make a big difference.
  How much space does the program take in RAM?  Have you looked at the
assembly listing to see how big the program is, exclusive of Ada.Text_IO
and any other libraries that it's hauling in?  Have you tried another
compiler, on another platform?



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

* Re: It's been a while...
  2003-05-29 22:19   ` Luke A. Guest
@ 2003-05-30  7:43     ` Martin Dowie
  0 siblings, 0 replies; 12+ messages in thread
From: Martin Dowie @ 2003-05-30  7:43 UTC (permalink / raw)


"Luke A. Guest" <laguest@__n_o_s_p_a_m__abyss2.demon.co.uk______> wrote in message news:<pan.2003.05.29.22.19.17.939492@__n_o_s_p_a_m__abyss2.demon.co.uk______>...
> > You could try the binder option "-shared" and link to a shared runtime,
> > as opposed to binding one in staticly..
> 
> Yes I could...and I could also get rid of the extra crap that surely isn't
> needed. Are you telling me that all those strings in the binary *are*
> required? I don't think so.

No, it was just a tip for reducing the size of the product of your build.



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

* Re: It's been a while...
  2003-05-29 21:18 It's been a while Luke A. Guest
                   ` (2 preceding siblings ...)
  2003-05-30  4:52 ` Re; " tmoran
@ 2003-05-30  9:03 ` Preben Randhol
  2003-05-30  9:27 ` Gautier
  2003-05-30 19:45 ` Randy Brukardt
  5 siblings, 0 replies; 12+ messages in thread
From: Preben Randhol @ 2003-05-30  9:03 UTC (permalink / raw)


Luke A. Guest wrote:
> Hi,
> 
> I learned Ada at University around 1995 and I've been interested in
> getting back into it. Now, I have a simple "hello" app and it is huge.
> Now, I don't want to have a load of people telling me not to judge Ada on
> the size, but I really want to know how to get the app size down. The app
> is:

What you should remember is that trying to tweak the hello app will not
give you much. When you have made a bigger program you will see the
effects of the various ways to get the size down. A real application
doesn't get so big as one would think from the simple hello example.

-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: It's been a while...
  2003-05-29 21:18 It's been a while Luke A. Guest
                   ` (3 preceding siblings ...)
  2003-05-30  9:03 ` Preben Randhol
@ 2003-05-30  9:27 ` Gautier
  2003-05-30 19:45 ` Randy Brukardt
  5 siblings, 0 replies; 12+ messages in thread
From: Gautier @ 2003-05-30  9:27 UTC (permalink / raw)


Luke A. Guest:

> I learned Ada at University around 1995 and I've been interested in
> getting back into it. Now, I have a simple "hello" app and it is huge.
> Now, I don't want to have a load of people telling me not to judge Ada on
> the size, but I really want to know how to get the app size down. The app
> is:
> 
> -rwxr-xr-x    1 laguest  users      200492 2003-05-29 22:16 hello
> 
> This is an example program from the sources, compiled with:
> 
> 	gnatmake -O3
...
> Now, surely the app doesn't need this info and it must be taking up a lot
> of space. Do I need to go into the linker scripts to strip this info out?

This is a feature of GNAT, not of all Ada compilers: no smart linking.
- at least afaik, and on 30-May-2003. The issue is as old as GNAT...
  http://groups.google.com/groups?q=smart+linking+gnat
Probabily the big executable size is harmless and doesn't hurt performance
(only used parts being loaded), but this is to be proven...
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!



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

* Re: Re; It's been a while...
  2003-05-30  4:52 ` Re; " tmoran
@ 2003-05-30 10:04   ` Georg Bauhaus
  0 siblings, 0 replies; 12+ messages in thread
From: Georg Bauhaus @ 2003-05-30 10:04 UTC (permalink / raw)


tmoran@acm.org wrote:
:   Have you looked at the
: assembly listing to see how big the program is, exclusive of Ada.Text_IO
: and any other libraries that it's hauling in?  Have you tried another
: compiler, on another platform?

In addition, if you omit the put_line("Hello World!") the size shrinks down
to 37k, which should underline what Tom has has about Text_IO.
You do have taken into account the fact that Ada has a run time 
system and exception handling?


Georg



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

* Re: It's been a while...
  2003-05-29 21:18 It's been a while Luke A. Guest
                   ` (4 preceding siblings ...)
  2003-05-30  9:27 ` Gautier
@ 2003-05-30 19:45 ` Randy Brukardt
  5 siblings, 0 replies; 12+ messages in thread
From: Randy Brukardt @ 2003-05-30 19:45 UTC (permalink / raw)


Luke A. Guest wrote in message ...
>Hi,
>
>I learned Ada at University around 1995 and I've been interested in
>getting back into it. Now, I have a simple "hello" app and it is huge.
>Now, I don't want to have a load of people telling me not to judge Ada
on
>the size, but I really want to know how to get the app size down. The
app
>is:
>
>-rwxr-xr-x    1 laguest  users      200492 2003-05-29 22:16 hello


Gee, that's tiny. On Windows, I get:

HELLO    EXE       217,875  05-30-03  2:39p hello.exe

after compiling with Gnat. You really ought to try another compiler (or
stop worrying). With Janus/Ada 3.1.2, I get:

HELLO    EXE        61,952  05-30-03  2:42p hello.exe

Much of that size is in the Microsoft libraries; the Ada generated part
is less than 40K. And, the same program on MS-DOS is around 18K in size.

(I used no optimization with either compiler, but I did use unused code
trimming on the Janus/Ada binder, as that is required with Windows
programs. And it matters a lot in this case.)

             Randy.







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

end of thread, other threads:[~2003-05-30 19:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-29 21:18 It's been a while Luke A. Guest
2003-05-29 21:27 ` Martin Dowie
2003-05-29 22:19   ` Luke A. Guest
2003-05-30  7:43     ` Martin Dowie
2003-05-29 22:22   ` Luke A. Guest
2003-05-30  2:13 ` Steve
2003-05-30  2:54   ` Wesley Groleau
2003-05-30  4:52 ` Re; " tmoran
2003-05-30 10:04   ` Georg Bauhaus
2003-05-30  9:03 ` Preben Randhol
2003-05-30  9:27 ` Gautier
2003-05-30 19:45 ` Randy Brukardt

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