Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.comment section with two lines

Tags:

linux

elf

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.

like image 739
ramp Avatar asked Apr 25 '13 15:04

ramp


People also ask

How do you comment multiple lines in a text file?

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.)

How to use multi-line comments in bash script?

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.

How to comment multiple non-consecutive lines?

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.

Is it OK to embed multiple comments in a batch script?

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.


1 Answers

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).

like image 120
twalberg Avatar answered Nov 05 '22 21:11

twalberg