Page MenuHomeFreeBSD

try to fix R_X86_64_RELATIVE handling in lld
Needs ReviewPublic

Authored by op on Apr 7 2018, 3:24 PM.
Tags
None
Referenced Files
F135454664: D15003.id.diff
Mon, Nov 10, 12:21 AM
Unknown Object (File)
Wed, Nov 5, 11:30 AM
Unknown Object (File)
Wed, Nov 5, 6:05 AM
Unknown Object (File)
Tue, Nov 4, 10:46 PM
Unknown Object (File)
Mon, Oct 27, 3:49 AM
Unknown Object (File)
Tue, Oct 21, 9:13 PM
Unknown Object (File)
Tue, Oct 21, 12:28 AM
Unknown Object (File)
Tue, Oct 21, 12:28 AM
Subscribers

Details

Reviewers
emaste
dim
Summary

Based on an old email on llvm's ML - http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20161212/411904.html

  • handle the R_X86_64_RELATIVE case for amd64 in lld.

With this patch the linker is able to link the postgresql
binary with dtrace.
Even if this isn't the proper solution, at least gives the
ability to compile portsgresql.

NOTE: this diff is against 11-stable

Bug report: http://s.verknowsys.com/ccc1cbd1fafb3d4e9138e10d73bee772.png
Old patch: http://lists.llvm.org/pipermail/llvm-commits/attachments/20161212/4d669479/attachment.bin

16:47 < dmilith> it linked with dtrace using lld
16:47 < dmilith> so that patch works
16:47 < dmilith> now let's try if dtrace agrees ;)
17:01 < dmilith> this is getting more and more interesting ;))
17:02 < dmilith> are hardlinks limited somehow?
17:02 < dmilith> DEBUG: creating and filling new WAL file
17:02 < dmilith> LOG: could not link file "pg_xlog/xlogtemp.12780" to "pg_xlog/000000010000000000000001":

Operation not permitted

17:02 < dmilith> FATAL: could not open file "pg_xlog/000000010000000000000001": No such file or directory
17:02 < dmilith> on initdb
17:02 < dmilith> I just love postgres build process.. heh
17:05 <@Zer0P> dmilith: yes
17:06 <@Zer0P> security.bsd.hardlink_check_uid: 1
17:06 <@Zer0P> security.bsd.hardlink_check_gid: 1
17:06 <@Zer0P> -> 0
17:06 <@Zer0P> security.bsd.hardlink_check_uid: Unprivileged processes cannot create hard links to files owned

by other users

17:06 < dmilith> ah!
17:06 < dmilith> great info! <3
17:08 < dmilith> like a charm..
17:08 <@Zer0P> so with the 2 liner patch, everything works fine? :P
17:09 < dmilith> yes
17:09 < dmilith> link passes, at least for postgresql

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 16039