Displaying 20 results from an estimated 800 matches similar to: "lld-link fails to link 32bits assembly functions but 64bits pass"
2019 Feb 18
2
lld-link fails to link 32bits assembly functions but 64bits pass
Hi Martin,
Thank you for the hint.
> For 32 bit windows, functions with cdecl calling convention (the default
> in C) are decorated with an underscore prefix. So you'd need to update
> your nasm source file to define the symbol _Foo instead of Foo. (Most
> assembly files use some sort of macro for wrapping this detail.)
Yes, my assembly files do use prefix macro (ASM_PFX) for
2019 Feb 27
2
lld-link crash when linking intrinsics lib
Hello Rui,
I met couples of lld-link crash when enable the clang-cl + lld-link build toolchain for Uefi firmware. Below is a simplified example (main.c and intrinsics.c).
Uefi firmware is self-contained and doesn't depend on the compiler intrinsics implementation, so we have our own intrinsics lib. It is weird that if I don't use the llvm-lib but directly "lld-link /NODEFAULTLIB
2019 Feb 28
4
lld-link crash when linking intrinsics lib
+Peter Collingbourne <pcc at chromium.org>
LTO is used in this test case, and one source file defines its own `memset`
function while the other file uses llvm.memset. Looks like LTO is confused
by the user-defined memset. Could you take a look?
Steven,
Do you need to use LTO? I thought that LTO is a workaround to not produce
an object file that cannot be handled by your ELF-to-COFF
2019 Jul 16
2
lld-link crash when build openssl with LTO
Yeah, it crashes indeed. I can reproduce the problem locally. Let me see
what is going on.
On Tue, Jul 16, 2019 at 9:00 PM Shi, Steven <steven.shi at intel.com> wrote:
> In my previous test case, after add the `-fno-builtin` to clang then
> build, the lld-link still has same crash as below:
>
>
>
> $ make
>
>
2019 Jul 16
2
lld-link crash when build openssl with LTO
lld should not crash in this case (so that's a bug that needs fixing), but
setting it aside, did you try adding `-fno-builtin` to clang so that clang
doesn't handle `memcpy` as a built-in function?
On Tue, Jul 16, 2019 at 8:46 PM Shi, Steven <steven.shi at intel.com> wrote:
> Hi Rui,
>
> For the test case in my previous email, if I change the `memcpy` to
> `foobar` in
2019 Jul 15
2
lld-link crash when build openssl with LTO
Hi Rui,
We met a lld-link crash problem when build 32bits openssl1.0 with LTO in uefi firmware. We narrow down and figure out a simple test case to reproduce this problem as blow. Please advise. Thank you!
$ cat main.c
void TlsDriverEntryPoint ()
{
unsigned char *ret = 0;
const unsigned char cryptopro_ext[17] = {0x00,0x00,0x00,0x00,
2019 Jul 16
3
lld-link crash when build openssl with LTO
Usage of the builtin appears independent of LTO, see below.
With any of -fno-builtin, -fno-builtin-memcpy, and -ffreestanding, which
are all typically used to prevent usage of memcpy calls, we still always
get a memcpy builtin in TlsDriverEntryPoint(). I see this even without
-flto (e.g. try with just -emit-llvm).
I guess it is because this memcpy is not coming from the original source,
but
2019 Jul 16
2
lld-link crash when build openssl with LTO
Hi Steven,
One thing I noticed is that you are defining `memcpy`, which clang has an
intrinsic with the same name. Can you try renaming it to a random name,
like `foobar`, to see if the problem still exists?
On Tue, Jul 16, 2019 at 10:10 AM Shi, Steven <steven.shi at intel.com> wrote:
> I’ve submitted a BZ for this issue as below:
>
>
>
> Bug 42626 - lld-link crash when
2019 Aug 03
2
lld-link /ALIGN option doesn't work for the "execute in place (XIP)"
Hi Rui,
We meet a problem when enable the execute in place (XIP, https://en.wikipedia.org/wiki/Execute_in_place) for uefi firmware with lld-link. We need to set the COFF executable file SectionAlignment through the lld-link /ALIGN option, but we find the SectionAlignment is hardcoded to 4096 which cause the /ALIGN option doesn't work at all. Below is the hardcode in lld:
lld\COFF\Writer.h
2017 Jun 14
2
Using LLD to create a .lib from a .def
I'm copying some LLD code into my codebase like this:
// workaround for LLD not exposing ability to convert .def to .lib
#include <set>
namespace lld {
namespace coff {
class SymbolBody;
class StringChunk;
struct Symbol;
struct Export {
StringRef Name; // N in /export:N or /export:E=N
StringRef ExtName; // E in /export:E=N
SymbolBody *Sym = nullptr;
uint16_t Ordinal
2017 Jun 15
2
Using LLD to create a .lib from a .def
On Wed, Jun 14, 2017 at 7:37 PM, Rui Ueyama <ruiu at google.com> wrote:
> On Wed, Jun 14, 2017 at 4:24 PM, Andrew Kelley via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> I'm copying some LLD code into my codebase like this:
>>
>> // workaround for LLD not exposing ability to convert .def to .lib
>>
>> #include <set>
>>
2019 Jan 28
4
lld write wrong symbol value in .data section if enable -pie
Hi Rui,
I still fail to enable the lld in my Uefi firmware build to replace ld, and I found it is related to the wrong symbol values in the .data section, which are pointed by R_X86_64_64 relocation entries. I need your advices.
My firmware uses a linker script https://github.com/tianocore/edk2/blob/master/BaseTools/Scripts/GccBase.lds to do the linking. We use position independent code with
2019 Jan 29
2
lld write wrong symbol value in .data section if enable -pie
Hi Rui,
A quick question: Does lld-link only work with clang-cl with windows-msvc option? Can lld-link work with clang with linux-gnu option?
Thanks
Steven Shi
Intel\SSG\FID\Firmware Infrastructure
From: Shi, Steven
Sent: Tuesday, January 29, 2019 1:32 PM
To: 'Rui Ueyama' <ruiu at google.com>
Cc: llvm-dev at lists.llvm.org
Subject: RE: lld write wrong symbol value in .data
2017 Jun 16
2
Using LLD to create a .lib from a .def
I saw this change come in yesterday:
commit 572ad839e2f66eaa82ffc71b1061eb3d06a4d126
Author: Saleem Abdulrasool <compnerd at compnerd.org>
Date: Thu Jun 15 20:39:58 2017 +0000
COFF: add support for lib mode usage
When link is invoked with `/def:` and no input files, it behaves as if
`lib.exe` was invoked. Emulate this behaviour, generating the import
library from the
2019 Jan 29
3
lld write wrong symbol value in .data section if enable -pie
Hi Rui,
> but why don't you use lld-link (lld for Windows target) instead of ld.lld (lld for Unix target) to create UEFI applications?
I need support both PE/COFF and ELF format tools. I’m also working on the lld-link enabling (clang-cl + lld-link) in both Linux and windows. The ld.lld enabling (clang + ld.lld) is for ELF format native users. E.g.
2018 Aug 20
2
Windows "0xC00001A5: An invalid exception handler routine has been detected" with LLVM win32 (i386) SEH code
Indeed, it's 32bits x86 and there's no .safeseh or anything like it,
even readobj -coff-load-config says nothing:
File: ConsoleApplication830.exe
Format: COFF-i386
Arch: i386
AddressSize: 32bit
Now I know what to look for, thanks!
On Mon, Aug 20, 2018, at 18:46, Reid Kleckner wrote:
> This is 32-bit x86, right? Sounds like the exception handler did not
> appear in the /safeseh
2023 Aug 11
1
Bug in dhcp-dyndns.sh script, A_REC always singleton array
On Fri, Aug 11, 2023, at 2:58 PM, Rowland Penny via samba wrote:
> On Fri, 11 Aug 2023 14:03:01 +0200
> Kasper Brandt via samba <samba at lists.samba.org> wrote:
>
> > Hello
> > I was directed to discuss this issue here. As I understand the issue
> > with using the unquoted variable is that it expand globs unless
> > noglob is set. E.g.
> >
> >
2008 Jul 02
1
help on list comparison
hi
I want to compare two list by its names and get the values of that list.
can anybody let me know the syntax of comparing the list by their names
using a for loop
c.genes<- list()
for(i in 1:100)
c.genes[[1]]<- geneset(which(geneset == tobecampared[i]))
}
here geneset is a list and also tobecampared is a list
Thank you
Ramya
--
View this message in context:
2023 Aug 11
1
Bug in dhcp-dyndns.sh script, A_REC always singleton array
Hello
I was directed to discuss this issue here. As I understand the issue with using the unquoted variable is that it expand globs unless noglob is set. E.g.
root at dy3:/# test="b*"
root at dy3:/# a=($test)
root at dy3:/# echo ${a[0]}
bin
It does seem a bit hypothetical that the output of sambatool dns query ... for an A record should contain a glob, but for the sake of robustness it
2023 Aug 11
1
Bug in dhcp-dyndns.sh script, A_REC always singleton array
On Fri, 11 Aug 2023 14:03:01 +0200
Kasper Brandt via samba <samba at lists.samba.org> wrote:
> Hello
> I was directed to discuss this issue here. As I understand the issue
> with using the unquoted variable is that it expand globs unless
> noglob is set. E.g.
>
> root at dy3:/# test="b*"
> root at dy3:/# a=($test)
> root at dy3:/# echo ${a[0]}
> bin