Questions tagged [gold-linker]

`gold` is the name of a ELF linker included in binutils

gold is an linker included in binutils as a faster, ELF-only, alternative to the traditional linker known as ld or ld.bfd.

Is considered in beta. (as of February, 2013, binutils release 2.23-1)

It was started on Google and then release as open source and added to binutils.

50 questions
1
vote
2 answers

Detect when linking a binary has finished by looking at just the executable?

The build tool for the language in which our project is written does compilation and linking in parallel, for a number of different binaries and so on. In CI we have a separate thread that looks for these compiled binaries as they become available…
jberryman
  • 16,334
  • 5
  • 42
  • 83
1
vote
1 answer

Is it safe for ld to interpret executables linked by gold?

Take a simple hello world program and compile it as follows: > g++ --version g++ 6.3.0 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for…
OMGtechy
  • 7,935
  • 8
  • 48
  • 83
1
vote
1 answer

How do the library selection rules differ between gold and the standard (bfd) linker?

I know that the standard ld.bfd processes static libraries in the sequence specified, pulling in whichever objects from each library satisfy an unmet (at that point in time) dependency. Does gold follow the same process, and is this documented…
Dan Stahlke
  • 1,417
  • 1
  • 15
  • 20
1
vote
1 answer

ld.gold: internal error in set_info_section, at output.h:3209

when i was migrating ld to gold, I met the following errors: ld.gold: internal error in set_info_section, at output.h:3209 my gold is binutil-2.25-gold. I didn't get any clues from google. anyone know this? Thanks a lot
Herry Li
  • 11
  • 2
1
vote
1 answer

How do I link Intel MKL and libdl with gold linker?

I'm having a problem linking Intel MKL and libdl using the gold linker on CentOS: When I run this script: #!/bin/bash MKL_INC=$MKL_INSTALL_DIR/include MKL_LIB=$MKL_INSTALL_DIR/lib . /opt/rh/devtoolset-6/enable cat > t.c << end_mkltest #include…
Andrew Tomazos
  • 66,139
  • 40
  • 186
  • 319
1
vote
0 answers

Using more than one linker in the same make

I'm currently trying to do a source installation of LLVM in a gentoo i686 virtual machine, and in the process of compiling (make) the default linker (bfd) throws an error because of a shortage in memory. In this site I found that changing the linker…
Diego Bano
  • 11
  • 3
1
vote
1 answer

Adding run-time shared library search-path to executable at compile-time | clang | Ubuntu

An executable I'm compiling needs the rpath to a library file at runtime. Currently, I'm compiling the executable with, clang -O3 -mllvm -polly -mllvm -polly-target=gpu vector_add.c -lGPURuntime -ldl And then using either of the following methods…
kesari
  • 536
  • 1
  • 6
  • 16
1
vote
1 answer

Does Cygwin support the Gold linker?

I'm performing a release test cycle. One of the tests for GNU Linux is integration with the Gold linker: export LD=ld.gold make The makefile has the following logic to recognize the Gold linker: # LD gold linker testing ifeq ($(findstring…
jww
  • 97,681
  • 90
  • 411
  • 885
1
vote
1 answer

How to enable Gold linker?

I recall that when Gold linker was introduced to NDK, there was an instruction on how to switch to it. But now I can't find that info anywhere in the docs. So, what do I put to my Application.mk in order to use the gold linker? I've tried this…
Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335
1
vote
1 answer

Generate LLVM IR for httpd

I am trying to compile apache2 with LLVM, to generate final binaries in LLVM IR. I used flto option in compiling and linking and passed "also-emit-llvm" to the linker through clang. It seems to work for most steps, however I had two concerns 1)…
1
vote
2 answers

Is binary linked with gold linker running faster?

Running simulation code using GEANT4 (large Monte Carlo C++ simulation framework, lots of shared libraries). Compiled and linked GEANT and my app with gold linker and with standard BFD based linker. Looks like gold one is running a bit faster (1'47"…
Severin Pappadeux
  • 18,636
  • 3
  • 38
  • 64
0
votes
0 answers

‘YYEMPTY’ undeclared (first use in this function); did you mean ‘YYCOPY’?

I'm trying to build gas and gold linkers. But while building them I'm facing the following errors: I'm using gcc (Ubuntu 8.4.0-3ubuntu2) 8.4.0 to build it. yyscript.c:2204:12: error: ‘YYEMPTY’ undeclared (first use in this function); did you mean…
NobinPegasus
  • 545
  • 2
  • 16
0
votes
1 answer

LLVM IR for a large C project

I'm new to LLVM, clang etc. My primary need is to convert C code to LLVM IR (.ll) then parse this to a assembly-like language. For this I was till now working with small length c codes (single file) and to get these converted to LLVM IR I used - $…
fennec
  • 13
  • 3
0
votes
0 answers

During installation of LLVM and gold-plugin came across fatal error: cannot allocate memory

Doing my project of displaying clang-cfi mechanism. Therefore, the LLVM gold-plugin is needed. According to the description from a post, when I was doing the 6 step, after I typed make -j8 (here I also try with make -j1, -j2, -j4), it always tell me…
maandma
  • 1
  • 2
0
votes
1 answer

where's to find all the ldflags shortcuts or its documentation?

I am always confused when a build system tells me that it found undefined reference to something. It is pretty clear that undefined reference error is related to the final linking, and therefore it is releated to the LDFLAGS variable in the build…
user7969519