search for: oformat

Displaying 20 results from an estimated 46 matches for "oformat".

Did you mean: format
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 know how to do this with llvm? -- View this message in...
2016 Aug 18
3
Should lld support binary output ("--oformat binary")?
...ld is the inability to build the bootloader components. We have a patch[1] in review to address one of the problems by switching to using a linker script instead of GNU ld's -N option. Another issue is that some bootloader components are created by the linker directly as binary objects, using --oformat binary. (Other bootloader components are built by creating a temporary ELF object converting that to a raw binary using objcopy.) Is binary output enough of an unusual use case that we're unlikely to support it in lld? [1] https://reviews.freebsd.org/D7409
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. Apparently it includes the dynamic linker inside it. >...
2009 Dec 17
3
[LLVMdev] Compiling a raw binary with llvm/clang
...bility 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 > > -- View this message in context: http://ol...
2015 Feb 26
1
[PATCH] builder: handle -v and -x flags like in other tools (RHBZ#1196100)
...aa9360e117308e78. --- builder/builder.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index a519913..0ddf076 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -555,7 +555,8 @@ let main () = let preallocation = if oformat = "qcow2" then Some "metadata" else None in let () = let g = new G.guestfs () in - if verbose then ( g#set_trace true; g#set_verbose true ); + if trace then g#set_trace true; + if verbose then g#set_verbose true; g#disk_create ?preal...
2018 Jul 25
2
LLD COFF library: crashes when lld::coff::link is called twice
...e 166 C++ zig.exe!lld::coff::LinkerDriver::link(llvm::ArrayRef<char const *> ArgsArr) Line 1331 C++ zig.exe!lld::coff::link(llvm::ArrayRef<char const *> Args, bool CanExitEarly, llvm::raw_ostream & Diag) Line 71 C++ zig.exe!ZigLLDLink(ZigLLVM_ObjectFormatType oformat, const char * * args, unsigned __int64 arg_count, void(*)(void *, const char *, unsigned __int64) append_diagnostic, void * context) Line 837 C++ zig.exe!zig_lld_link(ZigLLVM_ObjectFormatType oformat, const char * * args, unsigned __int64 arg_count, Buf * diag) Line 435 C++ zig.exe!...
2018 Aug 08
2
LLD COFF library: crashes when lld::coff::link is called twice
...:LinkerDriver::link(llvm::ArrayRef<char const *> >> ArgsArr) Line 1331 C++ >> zig.exe!lld::coff::link(llvm::ArrayRef<char const *> Args, bool >> CanExitEarly, llvm::raw_ostream & Diag) Line 71 C++ >> zig.exe!ZigLLDLink(ZigLLVM_ObjectFormatType oformat, const char * * >> args, unsigned __int64 arg_count, void(*)(void *, const char *, unsigned >> __int64) append_diagnostic, void * context) Line 837 C++ >> zig.exe!zig_lld_link(ZigLLVM_ObjectFormatType oformat, const char * * >> args, unsigned __int64 arg_count, Buf *...
2016 May 13
2
How to debug if LTO generate wrong code?
...te__((ms_abi))" -mno-red-zone -mcmodel=large -g -Os -flto *_CLANGLTO38_X64_DLINK_FLAGS = -flto -nostdlib -Wl,-n -Wl,-q -Wl,--gc-sections -Wl,-z,common-page-size=0x40 -Wl,--entry,$(IMAGE_ENTRY_POINT) -Wl,-u,$(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map -Wl,-melf_x86_64 -Wl,--oformat=elf64-x86-64 *_CLANGLTO38_X64_ASM_FLAGS = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h -m64 -target x86_64-pc-linux-gnu *_CLANGLTO38_X64_RC_FLAGS = -I binary -O elf64-x86-64 -B i386 --rename-section .data=.hii *_CLANGLTO38_X64_NASM_FLAGS = -f elf64...
2005 Jan 05
2
Comiple fails for Xen 2.0.2
Changes in xen/arch/x86/domain.c in 2.0.2 break comiple for me with: ld --oformat elf32-i386 -T x86_32/xen.lds -N \ boot/x86_32.o /home/root/xen-2.0/xen/common/common.o /home/root/xen-2.0/xen/drivers/char/driver.o /home/root/xen-2.0/xen/drivers/acpi/driver.o /home/root/xen-2.0/xen/drivers/pci/driver.o /home/root/xen-2.0/xen/arch/x86/arch.o -o /home/root/xen-2.0/xen/xen-syms...
2019 Jan 28
4
lld write wrong symbol value in .data section if enable -pie
.../home/jshi19/llvm/releaseinstall/bin/../lib -L/lib -L/usr/lib -q --gc-sections -z max-page-size=0x40 --entry _ModuleEntryPoint -Map /home/jshi19/wksp_efi/lgao4/edk2/Build/OvmfX64/NOOPT_CLANG38/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.map --whole-archive -O0 -melf_x86_64 --oformat elf64-x86-64 --start-group @/home/jshi19/wksp_efi/lgao4/edk2/Build/OvmfX64/NOOPT_CLANG38/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/OUTPUT/static_library_files.lst --end-group --defsym=PECOFF_HEADER_SIZE=0x228 --script=/home/jshi19/wksp_efi/lgao4/edk2/BaseTools/Scripts/GccBase.lds 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 guessing that is what you meant by the "then use the same procedure you were originally using." right? Sorry for the hasle. Thank you for your help, Ven Eli Friedman-2 wrote: >...
2019 Jan 29
3
lld write wrong symbol value in .data section if enable -pie
.../home/jshi19/llvm/releaseinstall/bin/../lib -L/lib -L/usr/lib -q --gc-sections -z max-page-size=0x40 --entry _ModuleEntryPoint -Map /home/jshi19/wksp_efi/lgao4/edk2/Build/OvmfX64/NOOPT_CLANG38/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.map --whole-archive -O0 -melf_x86_64 --oformat elf64-x86-64 --start-group @/home/jshi19/wksp_efi/lgao4/edk2/Build/OvmfX64/NOOPT_CLANG38/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/OUTPUT/static_library_files.lst --end-group --defsym=PECOFF_HEADER_SIZE=0x228 --script=/home/jshi19/wksp_efi/lgao4/edk2/BaseTools/Scripts/GccBase.lds 2....
2015 Nov 10
1
[PATCH] OCaml tools: use open_guestfs everywhere
...| 6 +++--- 10 files changed, 19 insertions(+), 43 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index feb6e0d..2c51550 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -570,9 +570,7 @@ let main () = (human_size osize); let preallocation = if oformat = "qcow2" then Some "metadata" else None in let () = - let g = new G.guestfs () in - if trace () then g#set_trace true; - if verbose () then g#set_verbose true; + let g = open_guestfs () in g#disk_create ?preallocation ofile oformat os...
2019 Jan 29
2
lld write wrong symbol value in .data section if enable -pie
.../home/jshi19/llvm/releaseinstall/bin/../lib -L/lib -L/usr/lib -q --gc-sections -z max-page-size=0x40 --entry _ModuleEntryPoint -Map /home/jshi19/wksp_efi/lgao4/edk2/Build/OvmfX64/NOOPT_CLANG38/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.map --whole-archive -O0 -melf_x86_64 --oformat elf64-x86-64 --start-group @/home/jshi19/wksp_efi/lgao4/edk2/Build/OvmfX64/NOOPT_CLANG38/X64/MdeModulePkg/Application/HelloWorld/HelloWorld/OUTPUT/static_library_files.lst --end-group --defsym=PECOFF_HEADER_SIZE=0x228 --script=/home/jshi19/wksp_efi/lgao4/edk2/BaseTools/Scripts/GccBase.lds 2....
2015 Oct 23
2
[PATCH 1/2] resize: add --unknown-filesystems
Introduce a new option to control how virt-resize behaves when asking to expand a filesystem, either unknown to libguestfs or that virt-resize cannot expand. The default keeps the current behaviour, i.e. just warn. --- bash/virt-resize | 3 +++ resize/resize.ml | 65 ++++++++++++++++++++++++++++++++++++++++++++++++-- resize/virt-resize.pod | 28 +++++++++++++++++++++- 3 files
2016 May 16
2
How to debug if LTO generate wrong code?
...=20070 If I enforce the -O0 to disable the optimization in LTO, the ld fail to link: ~/clang38/bin/clang -o Hello.dll -flto -O0 -nostdlib -Wl,-n -Wl,-q -Wl,--gc-sections -Wl,-z,common-page-size=0x40 -Wl,--entry,_ModuleEntryPoint -Wl,-u,_ModuleEntryPoint -Wl,-Map,Hello.map -Wl,-melf_x86_64 -Wl,--oformat=elf64-x86-64 -Wl,--start-group,, at static_library_files.lst -Wl,--end-group BaseLib.lib: error adding symbols: File format not recognized clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation) But if I enable the -O1, -O2, or higher -On, the ld link pass: ~/clan...
2016 May 23
0
[PATCH 5/5] mllib: add a new run_command helper
...uot;mv"; ifile; ofile |] in + if run_command cmd <> 0 then exit 1 | itags, `Pxzcat, otags -> let ifile = List.assoc `Filename itags in @@ -580,22 +579,21 @@ let main () = let () = let g = open_guestfs () in g#disk_create ?preallocation ofile oformat osize in - let cmd = - sprintf "virt-resize%s%s%s --output-format %s%s%s --unknown-filesystems error %s %s" - (if verbose () then " --verbose" else " --quiet") - (if is_block_device ofile then " --no-sparse" else "") -...
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"
2017 Apr 05
0
[PATCH 1/2] memdisk: Force ld output format to 32-bits
...mdisk/Makefile b/memdisk/Makefile index 42e56e0..ccd5738 100644 --- a/memdisk/Makefile +++ b/memdisk/Makefile @@ -78,7 +78,7 @@ memdisk16.o: memdisk16.asm $(NASM) -f bin $(NASMOPT) $(NFLAGS) $(NINCLUDE) -o $@ -l $*.lst $< memdisk_%.o: memdisk_%.bin - $(LD) -r -b binary -o $@ $< + $(LD) --oformat elf32-i386 -r -b binary -o $@ $< memdisk16.elf: $(OBJS16) $(LD) -Ttext 0 -o $@ $^ -- 2.1.4
2017 Jun 30
0
[PATCH v2 1/4] memdisk: Force ld output format to 32-bits
...mdisk/Makefile b/memdisk/Makefile index 42e56e0..ccd5738 100644 --- a/memdisk/Makefile +++ b/memdisk/Makefile @@ -78,7 +78,7 @@ memdisk16.o: memdisk16.asm $(NASM) -f bin $(NASMOPT) $(NFLAGS) $(NINCLUDE) -o $@ -l $*.lst $< memdisk_%.o: memdisk_%.bin - $(LD) -r -b binary -o $@ $< + $(LD) --oformat elf32-i386 -r -b binary -o $@ $< memdisk16.elf: $(OBJS16) $(LD) -Ttext 0 -o $@ $^ -- 2.1.4