Automatically apply “git update-index –chmod=+x” to executable files

git 2.9.X/2.10 (Q3 2016) brings chmod to git add itself! See commit 4e55ed3 (31 May 2016) by Edward Thomson (ethomson). Helped-by: Johannes Schindelin (dscho). (Merged by Junio C Hamano — gitster — in commit c8b080a, 06 Jul 2016) add: add –chmod=+x / –chmod=-x options The executable bit will not be detected (and therefore will not … Read more

Reason for huge size of compiled executable of Go

This exact question appears in the official FAQ: Why is my trivial program such a large binary? Quoting the answer: The linkers in the gc tool chain (5l, 6l, and 8l) do static linking. All Go binaries therefore include the Go run-time, along with the run-time type information necessary to support dynamic type checks, reflection, … Read more

How to compile a linux shell script to be a standalone executable *binary* (i.e. not just e.g. chmod 755)?

The solution that fully meets my needs would be SHC – a free tool, or CCsh a commercial tool. Both compile shell scripts to C, which then can be compiled using a C compiler. Links about SHC: https://github.com/neurobin/shc http://www.datsi.fi.upm.es/~frosal/ http://www.downloadplex.com/Linux/System-Utilities/Shell-Tools/Download-shc_70414.html Links about CCsh: http://www.comeaucomputing.com/faqs/ccshlit.html

Producing executable jar in NetBeans

I just had the same problem in NetBeans 7.2.1 with a Maven Java Application project. Modify the pom.xml file to include the maven assembly plugin with one tweak to myrho’s answer (needs to reference the predefined descriptor “jar-with-dependencies”): <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.4</version> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>your.app.MainClass</mainClass> </manifest> </archive> </configuration> <executions> <execution> <id>make-assembly</id> <phase>package</phase> … Read more

Why does the PLT exist in addition to the GOT, instead of just using the GOT?

The problem is that replacing call printf@PLT with call [printf@GOTPLT] requires that the compiler knows that the function printf exists in a shared library and not a static library (or even in just a plain object file). The linker can change call printf into call printf@PLT, jmp printf into jmp printf@PLT or even mov eax, … Read more