I have an executable with two lines in comment section as readelf shows :
readelf -p .comment ac_test
String dump of section '.comment':
[ 0] GCC: (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
[ 39] GCC: (GNU) 4.6.0
The 4.3.4 compiler is the one installed in the Suse Linux but the 4.6 is compiled from sources. I have fix the PATH to point to 4.6 so the executable is compiled with.
I have the doubt if in any way the 4.3.4 toolchain is used.
My question is : Why do I have two compilers in the .comment section?, is any problem with that?,
Thanks.
The answer is actually very simple if you want to comment a continuous sequence of lines. Select the consecutive lines, then simply press ⌘ /. I have no idea how to comment multiple non-consecutive lines. Maybe somebody else can help with this, if it is even possible (I doubt it.)
Multiline or block comment in bash is not directly possible. You can use multiple single line comments but I know that’s not very convenient specially when you have to uncomment the entire block of code.
The answer is actually very simple if you want to comment a continuous sequence of lines. Select the consecutive lines, then simply press ⌘ /. I have no idea how to comment multiple non-consecutive lines. Maybe somebody else can help with this, if it is even possible (I doubt it.) Show activity on this post. There is such a function in the menu.
Although it is generally recommended that :labels are unique within a batch script, it really is OK to embed multiple comments like this within the same batch script. Or you could use one of these variants of npocmaka's solution. The use of REM instead of BREAK makes the intent a bit clearer.
Hard to say with that little bit of information, but it's probable that the comment from the 4.3.4 compiler comes from an object or library that was linked into your binary (i.e. you didn't compile it yourself with your 4.6 compiler).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With