strings in executable

I did a “strings” on an executable (4600 bytes) that I’m trying to make even
smaller and I found this:

“Mario Charest” <mcharest@clipzinformatic.com> wrote in message
news:9qk3ua$q8e$1@inn.qnx.com

I did a “strings” on an executable (4600 bytes) that I’m trying to make
even
smaller and I found this:
\

Is this a cliffhanger? or were there no strings in the executable? :wink:

Poseidon

“Mario Charest” <mcharest@clipzinformatic.com> wrote in message
news:9qk3ua$q8e$1@inn.qnx.com

I did a “strings” on an executable (4600 bytes) that I’m trying to make
even
smaller and I found this:

Sorry hit wrong key.


GCC: (GNU) 2.95.2 19991024 (release)
GCC: (GNU) 2.95.2 19991024 (release)
GCC: (GNU) 2.95.2 19991024 (release)

Why 3 times the same string?

  • Mario

Mario Charest a écrit :

“Mario Charest” <> mcharest@clipzinformatic.com> > wrote in message
news:9qk3ua$q8e$> 1@inn.qnx.com> …

I did a “strings” on an executable (4600 bytes) that I’m trying to make
even
smaller and I found this:

Sorry hit wrong key.


GCC: (GNU) 2.95.2 19991024 (release)
GCC: (GNU) 2.95.2 19991024 (release)
GCC: (GNU) 2.95.2 19991024 (release)

Why 3 times the same string?

  • Mario

Sorry Mario don’t understand !! Try in French ;o))))

Alain.

“Alain Bonnefoy” <alain.bonnefoy@icbt.com> wrote in message
news:3BCDAD92.C1F47DE9@icbt.com

Mario Charest a écrit :

“Mario Charest” <> mcharest@clipzinformatic.com> > wrote in message
news:9qk3ua$q8e$> 1@inn.qnx.com> …

I did a “strings” on an executable (4600 bytes) that I’m trying to
make
even
smaller and I found this:

Sorry hit wrong key.


GCC: (GNU) 2.95.2 19991024 (release)
GCC: (GNU) 2.95.2 19991024 (release)
GCC: (GNU) 2.95.2 19991024 (release)

Why 3 times the same string?

  • Mario

Sorry Mario don’t understand !! Try in French ;o))))

Je recommence :wink:

Dans un executable généré avec GCC, je retrouve trois fois la même chaine
de caractères, voir ci-haut.

Ma question est: pourquoi trois fois la même ?

Mais j’y ai repensé, ca doit etre dans différent fichiers object ou
libraries de gcc.

S’tu mieux d’même :wink:

  • Mario

Alain.

Mario Charest wrote:

“Alain Bonnefoy” <> alain.bonnefoy@icbt.com> > wrote in message
news:> 3BCDAD92.C1F47DE9@icbt.com> …
Mario Charest a écrit :

“Mario Charest” <> mcharest@clipzinformatic.com> > wrote in message
news:9qk3ua$q8e$> 1@inn.qnx.com> …

I did a “strings” on an executable (4600 bytes) that I’m trying to
make
even
smaller and I found this:

Sorry hit wrong key.


GCC: (GNU) 2.95.2 19991024 (release)
GCC: (GNU) 2.95.2 19991024 (release)
GCC: (GNU) 2.95.2 19991024 (release)

Why 3 times the same string?

  • Mario

Sorry Mario don’t understand !! Try in French ;o))))


Je recommence > :wink:

Dans un executable généré avec GCC, je retrouve trois fois la même chaine
de caractères, voir ci-haut.

Ma question est: pourquoi trois fois la même ?

Mais j’y ai repensé, ca doit etre dans différent fichiers object ou
libraries de gcc.

S’tu mieux d’même > :wink:

  • Mario

Alain.

Pardonne, je manque les accents… :slight_smile:
J’ai suivre tout ci-haut excepter “S’tu mieux d’meme”. Explique, svp? Peut
etre en anglais :slight_smile: ? pour les maudits anglais…

Merci - Phil

Phil Olynyk wrote:

Mario Charest wrote:


“Alain Bonnefoy” <> alain.bonnefoy@icbt.com> > wrote in message
news:> 3BCDAD92.C1F47DE9@icbt.com> …

Mario Charest a écrit :


“Mario Charest” <> mcharest@clipzinformatic.com> > wrote in message
news:9qk3ua$q8e$> 1@inn.qnx.com> …

I did a “strings” on an executable (4600 bytes) that I’m trying to

make

even

smaller and I found this:

Sorry hit wrong key.


GCC: (GNU) 2.95.2 19991024 (release)
GCC: (GNU) 2.95.2 19991024 (release)
GCC: (GNU) 2.95.2 19991024 (release)

Why 3 times the same string?

  • Mario

Sorry Mario don’t understand !! Try in French ;o))))


Je recommence > :wink:

Dans un executable généré avec GCC, je retrouve trois fois la même chaine
de caractères, voir ci-haut.

Ma question est: pourquoi trois fois la même ?

Mais j’y ai repensé, ca doit etre dans différent fichiers object ou
libraries de gcc.

S’tu mieux d’même > :wink:

  • Mario


    Alain.




    Pardonne, je manque les accents… > :slight_smile:
    J’ai suivre tout ci-haut excepter “S’tu mieux d’meme”. Explique, svp? Peut
    etre en anglais > :slight_smile: > ? pour les maudits anglais…

Merci - Phil


For those who don’t speak french (read) S’ tu mieux d’meme is basically

saying is this better.

Regards,

Francois

Francois Desautels a écrit :

Phil Olynyk wrote:

Mario Charest wrote:


“Alain Bonnefoy” <> alain.bonnefoy@icbt.com> > wrote in message
news:> 3BCDAD92.C1F47DE9@icbt.com> …

Mario Charest a écrit :


“Mario Charest” <> mcharest@clipzinformatic.com> > wrote in message
news:9qk3ua$q8e$> 1@inn.qnx.com> …

I did a “strings” on an executable (4600 bytes) that I’m trying to

make

even

smaller and I found this:

Sorry hit wrong key.


GCC: (GNU) 2.95.2 19991024 (release)
GCC: (GNU) 2.95.2 19991024 (release)
GCC: (GNU) 2.95.2 19991024 (release)

Why 3 times the same string?

  • Mario

Sorry Mario don’t understand !! Try in French ;o))))


Je recommence > :wink:

Dans un executable généré avec GCC, je retrouve trois fois la même chaine
de caractères, voir ci-haut.

Ma question est: pourquoi trois fois la même ?

Mais j’y ai repensé, ca doit etre dans différent fichiers object ou
libraries de gcc.

S’tu mieux d’même > :wink:

  • Mario


    Alain.




    Pardonne, je manque les accents… > :slight_smile:
    J’ai suivre tout ci-haut excepter “S’tu mieux d’meme”. Explique, svp? Peut
    etre en anglais > :slight_smile: > ? pour les maudits anglais…

Merci - Phil


For those who don’t speak french (read) S’ tu mieux d’meme is basically
saying is this better.

Regards,

Francois

Ah ok, j’avais pas compris, ce doit etre du Quebecquois !

Amicalement,
le Francais. (Alain)

Pardonne, je manque les accents… > :slight_smile:

Hi Phil!

J’ai suivre tout ci-haut excepter “S’tu mieux d’meme”. Explique, svp?

In “good” french it would be “Est-ce mieux comme ca”.
It’s like writing “wanna bet”; proper english would suggest “want to bet”.

In French, the written and spoken language is very different.
The gap is even wider in Quebec. The “S’tu mieux d’meme” is
an attempt to close the gap, lol!

It helps other French people know I’m from Quebec :wink:

etre en anglais > :slight_smile: > ? pour les maudits anglais…

Maudits anglais? Come on Phil, most of the French people
in Quebec have evolved beyond that, at least that’s what
I like to think.

Merci - Phil

Mario Charest wrote:

Pardonne, je manque les accents… > :slight_smile:

Hi Phil!

J’ai suivre tout ci-haut excepter “S’tu mieux d’meme”. Explique, svp?

In “good” french it would be “Est-ce mieux comme ca”.
It’s like writing “wanna bet”; proper english would suggest “want to bet”.

In French, the written and spoken language is very different.
The gap is even wider in Quebec. The “S’tu mieux d’meme” is
an attempt to close the gap, lol!

It helps other French people know I’m from Quebec > :wink:

etre en anglais > :slight_smile: > ? pour les maudits anglais…


Maudits anglais? Come on Phil, most of the French people
in Quebec have evolved beyond that, at least that’s what
I like to think.

Merci - Phil

Hi Mario!
Je vous taquine. (I am teasing you(pl))…My stay in Montreal earlier this
year was most enjoyable, and I was never made to feel out of place or
unwelcome. I just wish I could import the Quebecois joie de vivre to Toronto!

Phil

Hi,

Mario Charest <mcharest@clipzinformatic.com> wrote in article <9qkeia$3ao$1@inn.qnx.com>…

[cut]

Dans un executable généré avec GCC, je retrouve trois fois la même chaine
de caractères, voir ci-haut.

Ma question est: pourquoi trois fois la même ?

Sorry, I don’t speak French (and English :wink:)
Is there any answer that question? I wonder why too many duplicate strings in binaries? Especially
like “GCC: (GNU) 2.95.2 19991024 (release)”.

Thanks,
Eduard.

My guess is that this was in a header and was compiled into several
different object modules (*.o) which were then linked together.


Bill Caroselli – 1(530) 510-7292
Q-TPS Consulting
QTPS@EarthLink.net


“ed1k” <ed1k@yahoo.com> wrote in message
news:01c15b05$05cbf020$766fa8c0@ED1K…

Hi,

Mario Charest <> mcharest@clipzinformatic.com> > wrote in article
9qkeia$3ao$> 1@inn.qnx.com> >…

[cut]

Dans un executable généré avec GCC, je retrouve trois fois la même
chaine
de caractères, voir ci-haut.

Ma question est: pourquoi trois fois la même ?


Sorry, I don’t speak French (and English > :wink:> )
Is there any answer that question? I wonder why too many duplicate strings
in binaries? Especially
like “GCC: (GNU) 2.95.2 19991024 (release)”.

Thanks,
Eduard.

cburgess:/home/cburgess/src/test >touch empty.c
cburgess:/home/cburgess/src/test >qcc -S empty.c
cburgess:/home/cburgess/src/test >cat empty.s
.file “empty.c”
.version “01.01”
gcc2_compiled.:
.ident "GCC: (GNU) 2.95.2 19991024 (releaseurgess:/home/cburgess/src/test >qcc -c empty.c
cburgess:/home/cburgess/src/test >strings empty.o
01.01
GCC: (GNU) 2.95.2 19991024 (release)
…symtab
…strtab
…shstrtab
…text
…data
…bss
…note
…comment
empty.c
gcc2_compiled.
cburgess:/home/cburgess/src/test >

So I guess that we’re getting one of those gcc identifiers per object module.

Looking at the source code, this appears to be hard-coded at present. :v(

I’ll make it switchable in the next release

\

cburgess@qnx.com

Does the gnu linker have an option for merging duplicate strings? If not,
is there any way to get that behavior with other tools?

Thanks

“Colin Burgess” <cburgess@qnx.com> wrote in message
news:9r1fbk$h8e$1@nntp.qnx.com

cburgess:/home/cburgess/src/test >touch empty.c
cburgess:/home/cburgess/src/test >qcc -S empty.c
cburgess:/home/cburgess/src/test >cat empty.s
.file “empty.c”
.version “01.01”
gcc2_compiled.:
.ident "GCC: (GNU) 2.95.2 19991024
(releaseurgess:/home/cburgess/src/test >qcc -c empty.c
cburgess:/home/cburgess/src/test >strings empty.o
01.01
GCC: (GNU) 2.95.2 19991024 (release)
.symtab
.strtab
.shstrtab
.text
.data
.bss
.note
.comment
empty.c
gcc2_compiled.
cburgess:/home/cburgess/src/test

So I guess that we’re getting one of those gcc identifiers per object
module.

Looking at the source code, this appears to be hard-coded at present. :v(

I’ll make it switchable in the next release

\

cburgess@qnx.com

Dwayne Nelson <nelsond@intgame.com> wrote:

Does the gnu linker have an option for merging duplicate strings? If not,
is there any way to get that behavior with other tools?

I don’t think so.

However, looking at the output using objdump, the strings are put into the .comment
section, which doesn’t appear to contain anything else, so doing a

strip -R .comment empty

removes the ident strings.

Thanks

“Colin Burgess” <> cburgess@qnx.com> > wrote in message
news:9r1fbk$h8e$> 1@nntp.qnx.com> …
cburgess:/home/cburgess/src/test >touch empty.c
cburgess:/home/cburgess/src/test >qcc -S empty.c
cburgess:/home/cburgess/src/test >cat empty.s
.file “empty.c”
.version “01.01”
gcc2_compiled.:
.ident "GCC: (GNU) 2.95.2 19991024
(releaseurgess:/home/cburgess/src/test >qcc -c empty.c
cburgess:/home/cburgess/src/test >strings empty.o
01.01
GCC: (GNU) 2.95.2 19991024 (release)
.symtab
.strtab
.shstrtab
.text
.data
.bss
.note
.comment
empty.c
gcc2_compiled.
cburgess:/home/cburgess/src/test

So I guess that we’re getting one of those gcc identifiers per object
module.

Looking at the source code, this appears to be hard-coded at present. :v(

I’ll make it switchable in the next release

\

cburgess@qnx.com


cburgess@qnx.com