bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/28918] ld can find the a function reference


From: qiaopengcheng at loongson dot cn
Subject: [Bug ld/28918] ld can find the a function reference
Date: Sat, 13 May 2023 07:31:07 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28918

乔鹏程 <qiaopengcheng at loongson dot cn> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED

--- Comment #3 from 乔鹏程 <qiaopengcheng at loongson dot cn> ---
(In reply to 乔鹏程 from comment #2)
> (In reply to Alan Modra from comment #1)
> > Testcase unavailable
> 
> (1)You can clone the `https://github.com/shushanhf/runtime`
> (2)git apply this patch file:
> ```
> diff --git a/eng/common/native/init-compiler.sh
> b/eng/common/native/init-compiler.sh
> index 517401b688b..813adec3ada 100644
> --- a/eng/common/native/init-compiler.sh
> +++ b/eng/common/native/init-compiler.sh
> @@ -126,11 +126,11 @@ if [ -z "$CC" ]; then
>  fi
>  
>  # Only lld version >= 9 can be considered stable. lld doesn't support s390x.
> -if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [ "$majorVersion"
> -ge 9 ] && [ "$build_arch" != "s390x" ]; then
> -    if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
> -        LDFLAGS="-fuse-ld=lld"
> -    fi
> -fi
> +#if [ "$compiler" = "clang" ] && [ -n "$majorVersion" ] && [
> "$majorVersion" -ge 9 ] && [ "$build_arch" != "s390x" ]; then
> +#    if "$CC" -fuse-ld=lld -Wl,--version >/dev/null 2>&1; then
> +#        LDFLAGS="-fuse-ld=lld"
> +#    fi
> +#fi
>  
>  SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")"
>  
> ```
> (3)enter the directory `cd  runtime/src/coreclr/` 
> (4)`./build-runtime.sh gcc -debug -skipmanaged -nopgooptimize
> -skipcrossarchnative `


should also add this patch within the `(2)` step:

```
diff --git a/src/coreclr/vm/methodtable.cpp b/src/coreclr/vm/methodtable.cpp
index 6682bc57b05..5beea48121d 100644
--- a/src/coreclr/vm/methodtable.cpp
+++ b/src/coreclr/vm/methodtable.cpp
@@ -2941,8 +2941,6 @@ void 
MethodTable::AssignClassifiedEightByteTypes(SystemVStructRegisterPassingHe

 #endif // defined(UNIX_AMD64_ABI_ITF)

-#if defined(TARGET_LOONGARCH64)
-
 bool MethodTable::IsLoongArch64OnlyOneField(MethodTable * pMT)
 {
     TypeHandle th(pMT);
@@ -3549,7 +3547,6 @@ _End_arg:

     return size;
 }
-#endif

 #if defined(TARGET_RISCV64)

diff --git a/src/coreclr/vm/methodtable.h b/src/coreclr/vm/methodtable.h
index acffd1b6141..e9172f3206a 100644
--- a/src/coreclr/vm/methodtable.h
+++ b/src/coreclr/vm/methodtable.h
@@ -747,10 +747,8 @@ public:
     // during object construction.
     void CheckRunClassInitAsIfConstructingThrowing();

-#if defined(TARGET_LOONGARCH64)
     static bool IsLoongArch64OnlyOneField(MethodTable * pMT);
     static int GetLoongArch64PassStructInRegisterFlags(CORINFO_CLASS_HANDLE
clh);
-#endif

 #if defined(TARGET_RISCV64)
     static bool IsRiscv64OnlyOneField(MethodTable * pMT);
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]