Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
1 vote
0 answers
18 views

Select specific version present in ld version script

Consider the setup present in this question: GNU LD symbol versioning & C++ binary backwards-compatibility Consider the version script. Is it possible to explicitly tell ld to limit the exposed ...
fusiled's user avatar
  • 309
1 vote
0 answers
77 views

/usr/bin/ld multiple definition of during compile

I just want to mention that I didnt write this code or modify it in any way prior to trying to compile it. I have just been copying the source from EL5 to 6 to 7 and compiling it. I think when it went ...
ZCT's user avatar
  • 329
0 votes
0 answers
22 views

Compile a PIE ELF program with different offsets in different sections

I am working on a research project where I need to compile a program with multiple sections. These sections need to be loaded with different PIE offsets. I am wondering how I can do it in GCC. See ...
Eric Stdlib's user avatar
  • 1,482
0 votes
1 answer
70 views

Unable to link libcurl statically and other libraries dynamically

I'm trying tu use curl-config --static-libs which is supposed to link libcurl statically but link all of libcurl's own dependencies dynamically. This is all in a current ubuntu noble container root@...
Philippe's user avatar
  • 1,907
0 votes
0 answers
11 views

Why gcc can put _start at 0x1040 while custom assembly code and linker script can not?

I was leaning linker script and wrote assembly code as below: #hello.s .data msg : .string "Hello, world!\n" len = . - msg .text .global _start _start: ...
clone wayne's user avatar
0 votes
1 answer
78 views

very simple gcc linking problem in C with libzip [duplicate]

I need help building a trivial C program that uses libzip. I have a much more complex version, but here I'm asking about the simplest possible ZIP file program to make it easy to see what the problem ...
erixoltan's user avatar
0 votes
0 answers
25 views

Change Linux build from shared ncurses5w to static causes a symbol has different size in shared object message?

Because the older ncurses5w is becoming harder to find, I changed the build to use /usr/lib/i386-linux-gnu/libncursesw.a and added tinfo as a shared library to link with. However if I move the binary ...
user3161924's user avatar
  • 2,069
0 votes
0 answers
30 views

`ld` says `undefined reference` for templated library [duplicate]

I'm trying to create a templated C++ library. The header file of the library is as follows: // header.h #include <iostream> template<typename T> class MyClass { private: ...
Setu's user avatar
  • 678
1 vote
1 answer
37 views

GNC C: Ideas over main starting point confusions?

An extremely simple problem demonstration: #include <stdio.h> void myFunc() { puts("Greetings, Code 'Mon ..."); } int main(int argc, char *argv[]) { puts("zMain 01.\n&...
Randall Nagy's user avatar
0 votes
0 answers
21 views

How to use gcc compilation flags to make the .data section of the program execute code

I use -z execstack flag, But it can't work. Only the stack has execution permissions, not the .data segment. Mapped address spaces: Start Addr End Addr Size Offset ...
kang kang's user avatar
0 votes
0 answers
29 views

what can i do to resolve the error shown by command make for genomemapper?

I am trying to download GenomeMapper-0.4.4 from http://1001genomes.org/downloads/genomemapper.html in my system-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0. this is the command i am following as ...
Yamini Verma's user avatar
0 votes
0 answers
61 views

Stop CMake from exporting dependencies

I am compiling a shared object using CMake (3.24) for Linux using gcc. For better code management, I have split our code into multiple static libraries that I combine together along with dependencies ...
Tejas Pendse's user avatar
1 vote
0 answers
40 views

Why does adding an LD_PRELOAD change order of relocation processing?

I have an I/O instrumentation tool that uses LD_PRELOAD to insert my shared object, libiot.so, into the call stack. When I do this, the order of the "relocation processing" changes. This ...
bauerjlb's user avatar
0 votes
0 answers
54 views

Use gcc to compile multiple c files, ml (masm) to compile multiple assembly files and link with extern linker: Undefined reference to '__main'

My ground problem is: I want to use a modern compiler to create through multplie steps a .exp file (special very old object file format from Phar Lab which starts with P3 as magic number and runs in ...
Fabian T's user avatar
0 votes
0 answers
64 views

MacOS dlopen search path does not add .dylib extension using gcc/ld

I have a dylib that loads my other dylib on Mac but the search path is correct but it is without extension. Here is an example: hmodule = dlopen(str, RTLD_NOW); I get an error: dlopen(@rpath/libtestx....
Mindaugas Jaraminas's user avatar

15 30 50 per page
1
2 3 4 5
68