[all-commits] [llvm/llvm-project] e03669: [profile][test] Build Posix/instrprof-dlopen-norpa...

Rainer Orth via All-commits all-commits at lists.llvm.org
Wed Aug 28 11:38:04 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e03669af239a41f9bec97ac53e46c1b2b72bbe52
      https://github.com/llvm/llvm-project/commit/e03669af239a41f9bec97ac53e46c1b2b72bbe52
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2024-08-28 (Wed, 28 Aug 2024)

  Changed paths:
    M compiler-rt/test/profile/Posix/instrprof-dlopen-norpath.test

  Log Message:
  -----------
  [profile][test] Build Posix/instrprof-dlopen-norpath.test objects as PIC (#106406)

`Profile-x86_64 :: Posix/instrprof-dlopen-norpath.test` `FAILs` on
Solaris/amd64 and similarly on Solaris/sparcv9:
```
RUN: at line 10: ./a.out 2>&1 | FileCheck compiler-rt/test/profile/Posix/instrprof-dlopen-norpath.test -check-prefix=CHECK-FOO
+ ./a.out
+ FileCheck compiler-rt/test/profile/Posix/instrprof-dlopen-norpath.test -check-prefix=CHECK-FOO
compiler-rt/test/profile/Posix/instrprof-dlopen-norpath.test:24:12: error: CHECK-FOO: expected string not found in input
CHECK-FOO: foo:
           ^
<stdin>:1:1: note: scanning from here
unable to lookup symbol 'foo': ld.so.1: a.out: invalid handle: 0x0
```
The problem turned out to be two-fold: `OPEN_AND_RUN` didn't check the
`dlopen` return value and the objects linked into the shared objects to
be `dlopen`ed aren't built as PIC.

This patch fixes the latter.

Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, and
`x86_64-pc-linux-gnu`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list