search for: nostartfiles

Displaying 20 results from an estimated 24 matches for "nostartfiles".

2009 Dec 17
2
[LLVMdev] Compiling a raw binary with llvm/clang
Hey, The following code creates a raw binary (no ELF or PE.. just raw): gcc -nostartfiles -c -o hello.o hello.c ld -o hello1 hello.o --oformat binary You can try the following code out with it: void _start() { while(1); } The resulting raw binary is 5 bytes. Now how do you do this in clang/llvm? Apparently llvm-ld doesn't have a "--oformat binary" option. Anybody kno...
2009 Dec 17
3
[LLVMdev] Compiling a raw binary with llvm/clang
...ature that I am currently interested in is the ability to have "inline functions" between two object files. This was basically impossible with gcc. Is there any way to make the raw binary with llvm? Thank you, Ven Török Edwin wrote: > > > An example with clang: > $ clang -nostartfiles -c x.c -o x.o > $ ld -o x x.o --oformat binary > > Or to get a 32-bit one: > $ /llvm-git/obj/Release/bin/clang -nostartfiles -c x.c -o x.o -m32 > $ ld -o x1 x.o --oformat binary -melf_i386 > > This one is indeed 5 bytes long. > > Best regards, > --Edwin > >...
2009 Dec 17
0
[LLVMdev] Compiling a raw binary with llvm/clang
On 2009-12-17 22:08, LiteHacker wrote: > Hey, > > The following code creates a raw binary (no ELF or PE.. just raw): > > gcc -nostartfiles -c -o hello.o hello.c > ld -o hello1 hello.o --oformat binary > > You can try the following code out with it: > > void _start() > { > while(1); > } > > The resulting raw binary is 5 bytes. > It is 2.1M here (on x86_64), and 4.3k with -m32 when using gcc 4.4.2....
2009 Dec 18
1
[LLVMdev] Compiling a raw binary with llvm/clang
$ clang -ffunction-sections -fdata-sections -Os -nostartfiles -c -o hello.o hello.c $ clang -ffunction-sections -fdata-sections -Os -nostartfiles -c -o test.o test.c $ llvm-ld -s -o hello2 hello.o $ llc hello2.bc -o hello3 $ ld -o hello_B hello3 --oformat binary ld:hello3: file format not recognized; treating as linker script ld:hello3:1: syntax error I am g...
2009 Dec 17
0
[LLVMdev] Compiling a raw binary with llvm/clang
On Thu, Dec 17, 2009 at 1:00 PM, LiteHacker <vilmer88 at gmail.com> wrote: > > Indeed ld does link it. The reason I am using llvm-ld, is for its unique > functionality. > I intend to link to object files together (created by cling), and link them > with llvm-ld. > The main feature that I am currently interested in is the ability to have > "inline functions"
2019 Mar 25
2
Trying to create a pure LLVM toolchain on musl based distribution
.../usr/lib/linux directory under the clang's one. I've fixed that it worked, now I still have to find the solution regarding crtbeginS.so and crtendS.so. Thanks :) > I don't think that there is a way of preventing clang adding > crtbeginS.o and crtendS.o without --nostdlib or --nostartfiles but > using these options will also not add the other crt*.o files that you > may be expecting. > > There is a line in lib/Driver/Toolchains/Gnu.cpp which the Linux driver uses: > const bool HasCRTBeginEndFiles = > ToolChain.getTriple().hasEnvironment() || > (Too...
2020 Mar 27
3
llvm-objdump cannot recognize mul&mulh RISC-V M Instructions
...static -O3 -std=gnu99 -fno-common -fno-builtin -march=rv32im -mabi=ilp32 -DMB_ADDR=0x80FFFFC --target=riscv64-unknown-elf --sysroot=/home/llvm/workspace/riscv/riscv-tc-20200220/bin/riscv64-unknown-elf --gcc-toolchain=/home/llvm/workspace/riscv/riscv-tc-20200220 RISCV_LINK_OPTS ?= -static -nostdlib -nostartfiles -lm -lgcc -T /home/llvm/workspace/HRV_IDE/common/test.ld newlib_dir := /home/llvm/workspace/llvm/llvm-project/llvm_install/riscv64-unknown-elf/include src_dir := $(WORK_DIR)/src/$(PROJ) incs += -I$(WORK_DIR)/env -I$(WORK_DIR)/common -I$(src_dir) -I$(newlib_dir) src := $(wildcard $(src_dir)/*.c) $(...
2010 Aug 05
2
[LLVMdev] [PATCH] Capability of Win32.DLL with ENABLE_SHARED
...\ + -e "s/^.* T _\([^.][^.]*\)$$/\1/p" \ + -e "s/^.* [BDR] _\([^.][^.]*\)$$/\1 DATA/p" \ + $(SHLIB_FRAGS) \ + | sort -u) > $@ + +$(ObjDir)/$(LIBRARYNAME).a.o: $(LLVMLibsPaths) $(ObjDir)/.dir + $(Echo) Linking all LLVMLibs together for $(LIBRARYNAME) + $(Verb) $(Link) -nostartfiles -Wl,-r -nodefaultlibs -o $@ \ + -Wl,--whole-archive $(LLVMLibsPaths) \ + -Wl,--no-whole-archive + +$(ObjDir)/stdc++.a.o: $(ObjDir)/.dir + $(Echo) Linking all libs together for static libstdc++.a + $(Verb) $(Link) -nostartfiles -Wl,-r -nodefaultlibs -o $@ \ + -Wl,--whole-archive -lstdc++ \ +...
2020 Apr 26
2
assembly code for array iteration generated by llvm is much slower than gcc
...for (j = wstart + 1; j < wend; j++) { sum += c[j * w2]; sum += c[j * w1]; } dst_idx = w1 * i + w2; dst_idx2 = w2 * i + w1; b[dst_idx] = sum; b[dst_idx2] = sum/2; } } Compile command: riscv32-unkown-elf-g++ -nostartfiles -nostdlib -O2 -march=rv32imf -mabi=ilp32f -fno-builtin -S perf.c -o perf.g++ clang++ -O2 –target=riscv32 -march=rv32img -mabi=ilp32f -nostdlib -fno-builtin -S perf.c -o perf.lang the gcc version is 7.2.0 the llvm version is 10.0.0 Assembly code of the loop generated by gcc and llvm: [cid...
2008 Feb 20
3
OSX universal rsync
Hi All, Well, we compiled pre9 on an intel Mac running Tiger and now it does work on the machine. I need to see if that will now work on a PPC mac though. Hopefully it will but I am wondering if there is a way to compile and make a universal binary rsync for the Mac that will run on both, from my PPC Mac. Itried that yesterday with patch -p1 <patches/flags.diff patch -p1
2011 May 29
1
Where is the Centos Linux 5.5 kernel syscall handler for mmap? (Keith Roberts)
...ur help. gcc -shared -static-libgcc -Wl,-O1 -Wl,-z,defs -Wl, -dynamic-linker=/home/frankc/DQT1/glibc-2.9/lib/ld-linux.so.2 -B/home/frankc/DQTTest5/csu/ -Wl, --version-script=/home/frankc/DQTTest5/libc.map -Wl,-soname=libc.so.6 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -nostdlib -nostartfiles -e __libc_main -L/home/frankc/DQTTest5 -L/home/frankc/DQTTest5/math -L/home/frankc/DQTTest5/elf -L/home/frankc/DQTTest5/dlfcn -L/home/frankc/DQTTest5/nss -L/home/frankc/DQTTest5/nis -L/home/frankc/DQTTest5/rt -L/home/frankc/DQTTest5/resolv -L/home/frankc/DQTTest5/crypt -L/home/frankc/DQTTest5/n...
2010 Aug 05
0
[LLVMdev] [PATCH] Capability of Win32.DLL with ENABLE_SHARED
Hi Takumi, > Any feedbacks are welcome. > Have fun! This seems to be pretty useful addition to LLVM on windows! And it seems the only painless way to make plugins working, yay! For me the patch looks pretty good. One minor thing: could you please rename SharedDir => SharedLibDir Thanks! -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg
2008 Mar 05
0
Press delete key three times in R-2.6.1 to get segmentation fault (PR#10892)
...namic_linker: %{muclibc:%{mglibc:%e-mglibc and -muclibc used together}/lib/ld-uClibc.so.0;:/lib/ld-linux.so.2} *link_command: %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %l %{pie:-pie} %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:} %{L*} %(mfwrap) %(link_libgcc) %o %{fopenmp:%:include(libgomp.spec)%(link_gomp)} %(mflib) %{fprofile-arcs|fprofile-generate|coverage:-lgcov} %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}} %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}} -- y...
2010 Aug 05
3
[LLVMdev] [PATCH] Capability of Win32.DLL with ENABLE_SHARED
...\ + -e "s/^.* T _\([^.][^.]*\)$$/\1/p" \ + -e "s/^.* [BDR] _\([^.][^.]*\)$$/\1 DATA/p" \ + $(SHLIB_FRAGS) \ + | sort -u) > $@ + +$(ObjDir)/$(LIBRARYNAME).a.o: $(LLVMLibsPaths) $(ObjDir)/.dir + $(Echo) Linking all LLVMLibs together for $(LIBRARYNAME) + $(Verb) $(Link) -nostartfiles -Wl,-r -nodefaultlibs -o $@ \ + -Wl,--whole-archive $(LLVMLibsPaths) \ + -Wl,--no-whole-archive + +$(ObjDir)/stdc++.a.o: $(ObjDir)/.dir + $(Echo) Linking all libs together for static libstdc++.a + $(Verb) $(Link) -nostartfiles -Wl,-r -nodefaultlibs -o $@ \ + -Wl,--whole-archive -lstdc++ \ +...
2008 Jul 21
1
1.3.10 compile failure on FC9 w/ Gluster-patched Fuse
...d -ta glusterfs-1.3.10.tar.gz (..snip..) make[5]: Entering directory `/usr/src/redhat/BUILD/glusterfs-1.3.10/xlators/protocol/server/src' if gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -DGF_LINUX_HOST_OS -I../../../../libglusterfs/src -shared -nostartfiles -DDATADIR=\"/var\" -DCONFDIR=\"/etc/glusterfs\" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -MT server-protocol.o -MD -MP -MF ".deps/server-protocol.Tpo&quo...
2019 Mar 25
3
Trying to create a pure LLVM toolchain on musl based distribution
Hello, I'm trying to create a pure LLVM toolchain (that will not depend on GNU and produce GNU-free code too) on a musl based distribution. For now, I use gcc to bootstrap and build all LLVM components. I do it individually because I was running out of space and memory trying to build all using LLVM_ENABLE_PROJECTS. Also, I don't want to create a all-in-one package. Then, once
2005 Nov 18
0
WIne 0.9x crash on make
...when I run make: ------------------------------------------------------------------------------------- bas@pairadocs /mnt/downloads/Winestuff/wine-0.9.1 $ make (lotsa stuff going fine) make[1]: Entering directory `/mnt/downloads/Winestuff/wine-0.9.1/loader' gcc -m32 -o wine-preloader -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c000000 preloader.o -L../libs/port -lwine_port preloader.o(.text+0x14): In function `__bb_init_func': /mnt/downloads/Winestuff/wine-0.9.1/loader/preloader.c:156: undefined reference to `__guard' preloader.o(.text+0x1f):/mnt/downloads/Winestuff/wine-0.9.1/loade...
2019 Mar 11
2
Compiling for baremetal ARMv4 on Ubuntu Linux
...tried the following: I created a working gcc version with arm-none-eabi-gcc (this took some time, hence the late answer I'm afraid). The output of the linker stage looks like this: > > root at christian-forschung-virtual-machine:/home/progs# arm-none-eabi-gcc -v start.o barehello.o io.o -nostartfiles -Wl,--build-id=none -Wl,-init=_start -Ttext 0x8000 -static -o hello > > Using built-in specs. > COLLECT_GCC=arm-none-eabi-gcc > COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/6.3.1/lto-wrapper > Target: arm-none-eabi > Configured with: ../src/configure --build=x86_64-linux-gnu --p...
2019 Aug 16
0
Wine release 4.14
...rtbase. gdiplus: Build with ucrtbase. vbscript: Build with ucrtbase. dsound: Build with ucrtbase. winecrt0: Add __delayLoadHelper2. winecrt0: Add DllMainCRTStartup. msvcr70: Provide floating point function wrappers in importlib. winegcc: Use -nodefaultlibs -nostartfiles for builtin DLLs. kernel32/tests: Improve timeout handling in debugger tests. server: Report only one debug event per process at the time. jscript: Support VT_UI1 and VT_I1 types. jscript: Allow 0x strings with explicit radix 16 in parseInt. jscript: Add support for pa...
2019 Mar 04
2
Compiling for baremetal ARMv4 on Ubuntu Linux
...tried the following: I created a working gcc version with arm-none-eabi-gcc (this took some time, hence the late answer I'm afraid). The output of the linker stage looks like this: > > root at christian-forschung-virtual-machine:/home/progs# arm-none-eabi-gcc -v start.o barehello.o io.o -nostartfiles -Wl,--build-id=none -Wl,-init=_start -Ttext 0x8000 -static -o hello > > Using built-in specs. > COLLECT_GCC=arm-none-eabi-gcc > COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/6.3.1/lto-wrapper > Target: arm-none-eabi > Configured with: ../src/configure --build=x86_64-linux-gnu --p...