Project

General

Profile

Actions

Bug #1345

closed

[PATCH]

Added by alexh almost 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The following patch adds a bias to all ASSYM symbols that later is ignored by
genassym, as genassym only takes the last 4 digits.
This fixes two major compilation issues with llvm/clang, regarding:
1) lib/libc
2) make depend on sys

http://gitweb.dragonflybsd.org/~alexh/dragonfly.git/commit/5ebe390060e08aff3977372d0e49a1217ea20971

Actions #1

Updated by corecode almost 15 years ago

This is a seriously nasty hack. The very least it needs to be integrated with
genassym.sh

Actions #2

Updated by alexh almost 15 years ago

As can be seen below, it is already integrated into genassym.sh by means of
"substr($1, length($1) - 3, 4)", which only takes the last 4 digits of that
substring.

=========================================================
Excerpt from CURRENT sys/kern/genassym.sh =========================================================
/ C .*sign$/ {
sign = substr($1, length($1) - 3, 4)
sub("^0*", "", sign)
if (sign != "")
sign = "-"
}
/ C .*w0$/ {
w0 = substr($1, length($1) - 3, 4)
}
/ C .*w1$/ {
w1 = substr($1, length($1) - 3, 4)
}
/ C .*w2$/ {
w2 = substr($1, length($1) - 3, 4)
}
/ C .*w3$/ {
w3 = substr($1, length($1) - 3, 4) =========================================================

Actions #4

Updated by dillon almost 15 years ago

:New submission from Alex Hornung <>:
:
:The following patch adds a bias to all ASSYM symbols that later is ignored =
:by
:genassym, as genassym only takes the last 4 digits.
:This fixes two major compilation issues with llvm/clang, regarding:
:1) lib/libc
:2) make depend on sys
:
:http://gitweb.dragonflybsd.org/~alexh/dragonfly.git/commit/5ebe390060e08aff=
:3977372d0e49a1217ea20971

I'm awfully confused.  Is something using those array definitions in C?
-Matt
Matthew Dillon
&lt;&gt;
Actions #5

Updated by dillon almost 15 years ago

:
:Alex Hornung <> added the comment:
:
:As can be seen below, it is already integrated into genassym.sh by means of
:"substr($1, length($1) - 3, 4)", which only takes the last 4 digits of that
:substring.

I think what needs to be done here is to get rid of the hack entirely
and change genassym.sh over to the type of genassym.c generator we
use for the kernel.
-Matt
Actions #6

Updated by dillon almost 15 years ago

Ok, after Alex and I did a lot of messing around we came to the
conclusion that the offset hack is the way to go, at least for now.

The basic problem is that we can't generate proper structure sizes
using the NX mechanism when in a cross-build environment. The only
way to do it is to use the cross-built compiler to generate an
object module and then extract the offsets using nm or objdump.
So for now we will go with the offset hack and retain the nm/awk
stuff.
-Matt
Actions

Also available in: Atom PDF