Why is gcc not showing a warning message for using $ in a variable name?
I'm new to C and am learning C from Programming in C, 4th ed. by Stephen Kochan. On page 29, he writes $
is not a valid character for variable names. He is using the C11 standard.
I wrote the following code
#include <stdio.h>
int main (void)
{
int a$ = 1;
printf ("%i", a$);
return 0;
}
and ran it with the command gcc -std=c11 -pedantic practice.c -o practice.o && ./practice.o
. My filename is practice.c
.
The output is 1
. Shouldn't the compiler give me a warning for using $
? Isn't using $
sign for identifiers an extension that GCC provides?
I'm using GCC 8.2.0 in Ubuntu 18.10.
Edit:
Also, doesn't GCC not use the GNU extensions when I use -std=c11
? That is what is written in the Appendix of the book (pg. no. 497).
I am getting an warning by using -std=c89
though.
c gcc gcc-warning
New contributor
|
show 6 more comments
I'm new to C and am learning C from Programming in C, 4th ed. by Stephen Kochan. On page 29, he writes $
is not a valid character for variable names. He is using the C11 standard.
I wrote the following code
#include <stdio.h>
int main (void)
{
int a$ = 1;
printf ("%i", a$);
return 0;
}
and ran it with the command gcc -std=c11 -pedantic practice.c -o practice.o && ./practice.o
. My filename is practice.c
.
The output is 1
. Shouldn't the compiler give me a warning for using $
? Isn't using $
sign for identifiers an extension that GCC provides?
I'm using GCC 8.2.0 in Ubuntu 18.10.
Edit:
Also, doesn't GCC not use the GNU extensions when I use -std=c11
? That is what is written in the Appendix of the book (pg. no. 497).
I am getting an warning by using -std=c89
though.
c gcc gcc-warning
New contributor
7
Unrelated, but the.o
extension is usually used for object files, not for the final executable.
– Federico klez Culloca
13 hours ago
3
There's no extension for executables in *nix systems. The filesystem doesn't use that to determine the type of a file. So usually executables just don't have extensions andpractice
is correct. Check your/usr/bin
directory and you'll see that the programs there don't have an extension either.
– Federico klez Culloca
13 hours ago
2
About the fact that its properties say "shared library" is probably because of your desktop environment. If I dofile practice
from the command line I getpractice: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=928002f23b27d5c9bc55a15bf769edfaf3e62c23, not stripped
– Federico klez Culloca
13 hours ago
1
Thefile
utility can showshared object
for an ELF executable if it is a position-independent executable. Some distributions configure GCC so that it creates position-independent executables by default (usually this requires using-pie
and-fPIC
options).
– Sergey Vlasov
9 hours ago
1
@MrLister: Although traditional BASIC implementations used $ as a suffix for string-variable names, I wouldn't expect a trailing $ to have similar meanings in C. If I was examining code that used such a suffix, I'd expect that the programmer was exploiting some special way that the target implementation would process identifiers with such a suffix. For example, a compiler targeting a platform which can access objects near the frame pointer faster than those which are further away might place all objects whose names have a trailing$
after those that don't.
– supercat
7 hours ago
|
show 6 more comments
I'm new to C and am learning C from Programming in C, 4th ed. by Stephen Kochan. On page 29, he writes $
is not a valid character for variable names. He is using the C11 standard.
I wrote the following code
#include <stdio.h>
int main (void)
{
int a$ = 1;
printf ("%i", a$);
return 0;
}
and ran it with the command gcc -std=c11 -pedantic practice.c -o practice.o && ./practice.o
. My filename is practice.c
.
The output is 1
. Shouldn't the compiler give me a warning for using $
? Isn't using $
sign for identifiers an extension that GCC provides?
I'm using GCC 8.2.0 in Ubuntu 18.10.
Edit:
Also, doesn't GCC not use the GNU extensions when I use -std=c11
? That is what is written in the Appendix of the book (pg. no. 497).
I am getting an warning by using -std=c89
though.
c gcc gcc-warning
New contributor
I'm new to C and am learning C from Programming in C, 4th ed. by Stephen Kochan. On page 29, he writes $
is not a valid character for variable names. He is using the C11 standard.
I wrote the following code
#include <stdio.h>
int main (void)
{
int a$ = 1;
printf ("%i", a$);
return 0;
}
and ran it with the command gcc -std=c11 -pedantic practice.c -o practice.o && ./practice.o
. My filename is practice.c
.
The output is 1
. Shouldn't the compiler give me a warning for using $
? Isn't using $
sign for identifiers an extension that GCC provides?
I'm using GCC 8.2.0 in Ubuntu 18.10.
Edit:
Also, doesn't GCC not use the GNU extensions when I use -std=c11
? That is what is written in the Appendix of the book (pg. no. 497).
I am getting an warning by using -std=c89
though.
c gcc gcc-warning
c gcc gcc-warning
New contributor
New contributor
edited 13 hours ago
Apoorv Potnis
New contributor
asked 13 hours ago
Apoorv PotnisApoorv Potnis
1587
1587
New contributor
New contributor
7
Unrelated, but the.o
extension is usually used for object files, not for the final executable.
– Federico klez Culloca
13 hours ago
3
There's no extension for executables in *nix systems. The filesystem doesn't use that to determine the type of a file. So usually executables just don't have extensions andpractice
is correct. Check your/usr/bin
directory and you'll see that the programs there don't have an extension either.
– Federico klez Culloca
13 hours ago
2
About the fact that its properties say "shared library" is probably because of your desktop environment. If I dofile practice
from the command line I getpractice: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=928002f23b27d5c9bc55a15bf769edfaf3e62c23, not stripped
– Federico klez Culloca
13 hours ago
1
Thefile
utility can showshared object
for an ELF executable if it is a position-independent executable. Some distributions configure GCC so that it creates position-independent executables by default (usually this requires using-pie
and-fPIC
options).
– Sergey Vlasov
9 hours ago
1
@MrLister: Although traditional BASIC implementations used $ as a suffix for string-variable names, I wouldn't expect a trailing $ to have similar meanings in C. If I was examining code that used such a suffix, I'd expect that the programmer was exploiting some special way that the target implementation would process identifiers with such a suffix. For example, a compiler targeting a platform which can access objects near the frame pointer faster than those which are further away might place all objects whose names have a trailing$
after those that don't.
– supercat
7 hours ago
|
show 6 more comments
7
Unrelated, but the.o
extension is usually used for object files, not for the final executable.
– Federico klez Culloca
13 hours ago
3
There's no extension for executables in *nix systems. The filesystem doesn't use that to determine the type of a file. So usually executables just don't have extensions andpractice
is correct. Check your/usr/bin
directory and you'll see that the programs there don't have an extension either.
– Federico klez Culloca
13 hours ago
2
About the fact that its properties say "shared library" is probably because of your desktop environment. If I dofile practice
from the command line I getpractice: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=928002f23b27d5c9bc55a15bf769edfaf3e62c23, not stripped
– Federico klez Culloca
13 hours ago
1
Thefile
utility can showshared object
for an ELF executable if it is a position-independent executable. Some distributions configure GCC so that it creates position-independent executables by default (usually this requires using-pie
and-fPIC
options).
– Sergey Vlasov
9 hours ago
1
@MrLister: Although traditional BASIC implementations used $ as a suffix for string-variable names, I wouldn't expect a trailing $ to have similar meanings in C. If I was examining code that used such a suffix, I'd expect that the programmer was exploiting some special way that the target implementation would process identifiers with such a suffix. For example, a compiler targeting a platform which can access objects near the frame pointer faster than those which are further away might place all objects whose names have a trailing$
after those that don't.
– supercat
7 hours ago
7
7
Unrelated, but the
.o
extension is usually used for object files, not for the final executable.– Federico klez Culloca
13 hours ago
Unrelated, but the
.o
extension is usually used for object files, not for the final executable.– Federico klez Culloca
13 hours ago
3
3
There's no extension for executables in *nix systems. The filesystem doesn't use that to determine the type of a file. So usually executables just don't have extensions and
practice
is correct. Check your /usr/bin
directory and you'll see that the programs there don't have an extension either.– Federico klez Culloca
13 hours ago
There's no extension for executables in *nix systems. The filesystem doesn't use that to determine the type of a file. So usually executables just don't have extensions and
practice
is correct. Check your /usr/bin
directory and you'll see that the programs there don't have an extension either.– Federico klez Culloca
13 hours ago
2
2
About the fact that its properties say "shared library" is probably because of your desktop environment. If I do
file practice
from the command line I get practice: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=928002f23b27d5c9bc55a15bf769edfaf3e62c23, not stripped
– Federico klez Culloca
13 hours ago
About the fact that its properties say "shared library" is probably because of your desktop environment. If I do
file practice
from the command line I get practice: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=928002f23b27d5c9bc55a15bf769edfaf3e62c23, not stripped
– Federico klez Culloca
13 hours ago
1
1
The
file
utility can show shared object
for an ELF executable if it is a position-independent executable. Some distributions configure GCC so that it creates position-independent executables by default (usually this requires using -pie
and -fPIC
options).– Sergey Vlasov
9 hours ago
The
file
utility can show shared object
for an ELF executable if it is a position-independent executable. Some distributions configure GCC so that it creates position-independent executables by default (usually this requires using -pie
and -fPIC
options).– Sergey Vlasov
9 hours ago
1
1
@MrLister: Although traditional BASIC implementations used $ as a suffix for string-variable names, I wouldn't expect a trailing $ to have similar meanings in C. If I was examining code that used such a suffix, I'd expect that the programmer was exploiting some special way that the target implementation would process identifiers with such a suffix. For example, a compiler targeting a platform which can access objects near the frame pointer faster than those which are further away might place all objects whose names have a trailing
$
after those that don't.– supercat
7 hours ago
@MrLister: Although traditional BASIC implementations used $ as a suffix for string-variable names, I wouldn't expect a trailing $ to have similar meanings in C. If I was examining code that used such a suffix, I'd expect that the programmer was exploiting some special way that the target implementation would process identifiers with such a suffix. For example, a compiler targeting a platform which can access objects near the frame pointer faster than those which are further away might place all objects whose names have a trailing
$
after those that don't.– supercat
7 hours ago
|
show 6 more comments
2 Answers
2
active
oldest
votes
You get a warning with -std=c89 -pedantic
. C99 and later allow other implementation-defined characters in identifiers.
Yes. This is the reference: gcc.gnu.org/onlinedocs/gcc-8.2.0/cpp/…
– Apoorv Potnis
13 hours ago
add a comment |
According to this : GCC Documentation
In GNU C, you may normally use dollar signs in identifier names. This
is because many traditional C implementations allow such identifiers.
However, dollar signs in identifiers are not supported on a few target
machines, typically because the target assembler does not allow them.
So, $
is valid, but it's not a conforming way to code in C.
6
It's not valid C, only on GCC C. Try compiling with -ansi or -std=C11 and the warnings will start appearing.
– Spidey
13 hours ago
1
@Spidey with-std=c11
no warning appears
– Federico klez Culloca
13 hours ago
1
Try adding -Wall then, to show more warnings.
– Spidey
13 hours ago
1
@Spidey nope, still no warnings.
– Federico klez Culloca
13 hours ago
1
@Spidey: The Standard has no definition for "valid C". Its definition for a "conforming C program" encompasses any blob of text that is acceptable to at least one conforming C implementation. A source text that uses dollar signs in identifiers could not be a "strictly conforming proogram", but the authors of the Standard recognize that much C's usefulness stems from the ability to write non-portable programs that will be usefully processed by some C implementations even if not by all of them.
– supercat
7 hours ago
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Apoorv Potnis is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55087023%2fwhy-is-gcc-not-showing-a-warning-message-for-using-in-a-variable-name%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You get a warning with -std=c89 -pedantic
. C99 and later allow other implementation-defined characters in identifiers.
Yes. This is the reference: gcc.gnu.org/onlinedocs/gcc-8.2.0/cpp/…
– Apoorv Potnis
13 hours ago
add a comment |
You get a warning with -std=c89 -pedantic
. C99 and later allow other implementation-defined characters in identifiers.
Yes. This is the reference: gcc.gnu.org/onlinedocs/gcc-8.2.0/cpp/…
– Apoorv Potnis
13 hours ago
add a comment |
You get a warning with -std=c89 -pedantic
. C99 and later allow other implementation-defined characters in identifiers.
You get a warning with -std=c89 -pedantic
. C99 and later allow other implementation-defined characters in identifiers.
edited 13 hours ago
answered 13 hours ago
nwellnhofnwellnhof
23.6k46085
23.6k46085
Yes. This is the reference: gcc.gnu.org/onlinedocs/gcc-8.2.0/cpp/…
– Apoorv Potnis
13 hours ago
add a comment |
Yes. This is the reference: gcc.gnu.org/onlinedocs/gcc-8.2.0/cpp/…
– Apoorv Potnis
13 hours ago
Yes. This is the reference: gcc.gnu.org/onlinedocs/gcc-8.2.0/cpp/…
– Apoorv Potnis
13 hours ago
Yes. This is the reference: gcc.gnu.org/onlinedocs/gcc-8.2.0/cpp/…
– Apoorv Potnis
13 hours ago
add a comment |
According to this : GCC Documentation
In GNU C, you may normally use dollar signs in identifier names. This
is because many traditional C implementations allow such identifiers.
However, dollar signs in identifiers are not supported on a few target
machines, typically because the target assembler does not allow them.
So, $
is valid, but it's not a conforming way to code in C.
6
It's not valid C, only on GCC C. Try compiling with -ansi or -std=C11 and the warnings will start appearing.
– Spidey
13 hours ago
1
@Spidey with-std=c11
no warning appears
– Federico klez Culloca
13 hours ago
1
Try adding -Wall then, to show more warnings.
– Spidey
13 hours ago
1
@Spidey nope, still no warnings.
– Federico klez Culloca
13 hours ago
1
@Spidey: The Standard has no definition for "valid C". Its definition for a "conforming C program" encompasses any blob of text that is acceptable to at least one conforming C implementation. A source text that uses dollar signs in identifiers could not be a "strictly conforming proogram", but the authors of the Standard recognize that much C's usefulness stems from the ability to write non-portable programs that will be usefully processed by some C implementations even if not by all of them.
– supercat
7 hours ago
add a comment |
According to this : GCC Documentation
In GNU C, you may normally use dollar signs in identifier names. This
is because many traditional C implementations allow such identifiers.
However, dollar signs in identifiers are not supported on a few target
machines, typically because the target assembler does not allow them.
So, $
is valid, but it's not a conforming way to code in C.
6
It's not valid C, only on GCC C. Try compiling with -ansi or -std=C11 and the warnings will start appearing.
– Spidey
13 hours ago
1
@Spidey with-std=c11
no warning appears
– Federico klez Culloca
13 hours ago
1
Try adding -Wall then, to show more warnings.
– Spidey
13 hours ago
1
@Spidey nope, still no warnings.
– Federico klez Culloca
13 hours ago
1
@Spidey: The Standard has no definition for "valid C". Its definition for a "conforming C program" encompasses any blob of text that is acceptable to at least one conforming C implementation. A source text that uses dollar signs in identifiers could not be a "strictly conforming proogram", but the authors of the Standard recognize that much C's usefulness stems from the ability to write non-portable programs that will be usefully processed by some C implementations even if not by all of them.
– supercat
7 hours ago
add a comment |
According to this : GCC Documentation
In GNU C, you may normally use dollar signs in identifier names. This
is because many traditional C implementations allow such identifiers.
However, dollar signs in identifiers are not supported on a few target
machines, typically because the target assembler does not allow them.
So, $
is valid, but it's not a conforming way to code in C.
According to this : GCC Documentation
In GNU C, you may normally use dollar signs in identifier names. This
is because many traditional C implementations allow such identifiers.
However, dollar signs in identifiers are not supported on a few target
machines, typically because the target assembler does not allow them.
So, $
is valid, but it's not a conforming way to code in C.
edited 3 hours ago
answered 13 hours ago
Arnaud PeraltaArnaud Peralta
710116
710116
6
It's not valid C, only on GCC C. Try compiling with -ansi or -std=C11 and the warnings will start appearing.
– Spidey
13 hours ago
1
@Spidey with-std=c11
no warning appears
– Federico klez Culloca
13 hours ago
1
Try adding -Wall then, to show more warnings.
– Spidey
13 hours ago
1
@Spidey nope, still no warnings.
– Federico klez Culloca
13 hours ago
1
@Spidey: The Standard has no definition for "valid C". Its definition for a "conforming C program" encompasses any blob of text that is acceptable to at least one conforming C implementation. A source text that uses dollar signs in identifiers could not be a "strictly conforming proogram", but the authors of the Standard recognize that much C's usefulness stems from the ability to write non-portable programs that will be usefully processed by some C implementations even if not by all of them.
– supercat
7 hours ago
add a comment |
6
It's not valid C, only on GCC C. Try compiling with -ansi or -std=C11 and the warnings will start appearing.
– Spidey
13 hours ago
1
@Spidey with-std=c11
no warning appears
– Federico klez Culloca
13 hours ago
1
Try adding -Wall then, to show more warnings.
– Spidey
13 hours ago
1
@Spidey nope, still no warnings.
– Federico klez Culloca
13 hours ago
1
@Spidey: The Standard has no definition for "valid C". Its definition for a "conforming C program" encompasses any blob of text that is acceptable to at least one conforming C implementation. A source text that uses dollar signs in identifiers could not be a "strictly conforming proogram", but the authors of the Standard recognize that much C's usefulness stems from the ability to write non-portable programs that will be usefully processed by some C implementations even if not by all of them.
– supercat
7 hours ago
6
6
It's not valid C, only on GCC C. Try compiling with -ansi or -std=C11 and the warnings will start appearing.
– Spidey
13 hours ago
It's not valid C, only on GCC C. Try compiling with -ansi or -std=C11 and the warnings will start appearing.
– Spidey
13 hours ago
1
1
@Spidey with
-std=c11
no warning appears– Federico klez Culloca
13 hours ago
@Spidey with
-std=c11
no warning appears– Federico klez Culloca
13 hours ago
1
1
Try adding -Wall then, to show more warnings.
– Spidey
13 hours ago
Try adding -Wall then, to show more warnings.
– Spidey
13 hours ago
1
1
@Spidey nope, still no warnings.
– Federico klez Culloca
13 hours ago
@Spidey nope, still no warnings.
– Federico klez Culloca
13 hours ago
1
1
@Spidey: The Standard has no definition for "valid C". Its definition for a "conforming C program" encompasses any blob of text that is acceptable to at least one conforming C implementation. A source text that uses dollar signs in identifiers could not be a "strictly conforming proogram", but the authors of the Standard recognize that much C's usefulness stems from the ability to write non-portable programs that will be usefully processed by some C implementations even if not by all of them.
– supercat
7 hours ago
@Spidey: The Standard has no definition for "valid C". Its definition for a "conforming C program" encompasses any blob of text that is acceptable to at least one conforming C implementation. A source text that uses dollar signs in identifiers could not be a "strictly conforming proogram", but the authors of the Standard recognize that much C's usefulness stems from the ability to write non-portable programs that will be usefully processed by some C implementations even if not by all of them.
– supercat
7 hours ago
add a comment |
Apoorv Potnis is a new contributor. Be nice, and check out our Code of Conduct.
Apoorv Potnis is a new contributor. Be nice, and check out our Code of Conduct.
Apoorv Potnis is a new contributor. Be nice, and check out our Code of Conduct.
Apoorv Potnis is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55087023%2fwhy-is-gcc-not-showing-a-warning-message-for-using-in-a-variable-name%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
7
Unrelated, but the
.o
extension is usually used for object files, not for the final executable.– Federico klez Culloca
13 hours ago
3
There's no extension for executables in *nix systems. The filesystem doesn't use that to determine the type of a file. So usually executables just don't have extensions and
practice
is correct. Check your/usr/bin
directory and you'll see that the programs there don't have an extension either.– Federico klez Culloca
13 hours ago
2
About the fact that its properties say "shared library" is probably because of your desktop environment. If I do
file practice
from the command line I getpractice: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=928002f23b27d5c9bc55a15bf769edfaf3e62c23, not stripped
– Federico klez Culloca
13 hours ago
1
The
file
utility can showshared object
for an ELF executable if it is a position-independent executable. Some distributions configure GCC so that it creates position-independent executables by default (usually this requires using-pie
and-fPIC
options).– Sergey Vlasov
9 hours ago
1
@MrLister: Although traditional BASIC implementations used $ as a suffix for string-variable names, I wouldn't expect a trailing $ to have similar meanings in C. If I was examining code that used such a suffix, I'd expect that the programmer was exploiting some special way that the target implementation would process identifiers with such a suffix. For example, a compiler targeting a platform which can access objects near the frame pointer faster than those which are further away might place all objects whose names have a trailing
$
after those that don't.– supercat
7 hours ago