summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am3
-rw-r--r--Makefrag.am11
-rw-r--r--i386/Makefrag.am13
-rw-r--r--i386/i386at/boothdr.S17
-rw-r--r--i386/ldscript62
-rw-r--r--i386/xen/xen_boothdr.S17
-rw-r--r--linux/Makefrag.am3
-rw-r--r--linux/src/drivers/pci/pci.c4
-rw-r--r--xen/Makefrag.am53
9 files changed, 141 insertions, 42 deletions
diff --git a/Makefile.am b/Makefile.am
index 2907518..04885dd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -137,6 +137,7 @@ clib_routines := memcmp memcpy memmove memset bcopy bzero \
strchr strstr strsep strpbrk strtok \
htonl htons ntohl ntohs \
udivdi3 __udivdi3 \
+ __rel_iplt_start __rel_iplt_end \
_START _start etext _edata end _end # actually ld magic, not libc.
gnumach-undef: gnumach.$(OBJEXT)
$(NM) -u $< | sed 's/ *U *//' | sort -u > $@
@@ -167,11 +168,9 @@ exec_boot_PROGRAMS = \
#
EXTRA_DIST += \
- Makefile.correct_output_files_for_.S_files.patch \
config.status.dep.patch
EXTRA_DIST += \
- ChangeLog.0 ChangeLog.00 \
DEVELOPMENT
dist-hook:
diff --git a/Makefrag.am b/Makefrag.am
index 0377e80..aa6b228 100644
--- a/Makefrag.am
+++ b/Makefrag.am
@@ -102,6 +102,7 @@ libkernel_a_SOURCES += \
ipc/mach_msg.c \
ipc/mach_msg.h \
ipc/mach_port.c \
+ ipc/mach_port.h \
ipc/mach_rpc.c \
ipc/mach_debug.c \
ipc/port.h
@@ -137,6 +138,7 @@ libkernel_a_SOURCES += \
kern/ipc_kobject.c \
kern/ipc_kobject.h \
kern/ipc_mig.c \
+ kern/ipc_mig.h \
kern/ipc_sched.c \
kern/ipc_sched.h \
kern/ipc_tt.c \
@@ -153,6 +155,7 @@ libkernel_a_SOURCES += \
kern/mach_factor.h \
kern/mach_param.h \
kern/machine.c \
+ kern/machine.h \
kern/macro_help.h \
kern/pc_sample.c \
kern/pc_sample.h \
@@ -183,7 +186,6 @@ libkernel_a_SOURCES += \
kern/thread.h \
kern/thread_swap.c \
kern/thread_swap.h \
- kern/time_out.h \
kern/time_stamp.c \
kern/time_stamp.h \
kern/timer.c \
@@ -207,8 +209,10 @@ EXTRA_DIST += \
libkernel_a_SOURCES += \
util/putchar.c \
+ util/putchar.h \
util/puts.c \
- util/atoi.c
+ util/atoi.c \
+ util/atoi.h
#
# Virtual memory implementation.
@@ -235,6 +239,8 @@ libkernel_a_SOURCES += \
vm/vm_pageout.c \
vm/vm_pageout.h \
vm/vm_resident.c \
+ vm/vm_resident.h \
+ vm/vm_types.h \
vm/vm_user.c \
vm/vm_user.h
EXTRA_DIST += \
@@ -276,6 +282,7 @@ libkernel_a_SOURCES += \
device/net_io.h \
device/param.h \
device/subrs.c \
+ device/subrs.h \
device/tty.h
EXTRA_DIST += \
device/device.srv \
diff --git a/i386/Makefrag.am b/i386/Makefrag.am
index b2bad86..8cb7824 100644
--- a/i386/Makefrag.am
+++ b/i386/Makefrag.am
@@ -19,6 +19,7 @@
libkernel_a_SOURCES += \
i386/i386at/autoconf.c \
+ i386/i386at/autoconf.h \
i386/i386at/conf.c \
i386/i386at/cons_conf.c \
i386/i386at/idt.h \
@@ -33,12 +34,14 @@ if PLATFORM_at
libkernel_a_SOURCES += \
i386/i386at/boothdr.S \
i386/i386at/com.c \
+ i386/i386at/com.h \
i386/i386at/comreg.h \
i386/i386at/cram.h \
i386/i386at/disk.h \
i386/i386at/i8250.h \
i386/i386at/immc.c \
i386/i386at/int_init.c \
+ i386/i386at/int_init.h \
i386/i386at/interrupt.S \
i386/i386at/kd.c \
i386/i386at/kd.h \
@@ -101,10 +104,12 @@ libkernel_a_SOURCES += \
i386/i386/locore.S \
i386/i386/locore.h \
i386/i386/loose_ends.c \
+ i386/i386/loose_ends.h \
i386/i386/mach_param.h \
i386/i386/machine_routines.h \
i386/i386/machine_task.c \
i386/i386/machspl.h \
+ i386/i386/model_dep.h \
i386/i386/mp_desc.c \
i386/i386/mp_desc.h \
i386/i386/pcb.c \
@@ -122,7 +127,6 @@ libkernel_a_SOURCES += \
i386/i386/task.h \
i386/i386/thread.h \
i386/i386/time_stamp.h \
- i386/i386/timer.h \
i386/i386/trap.c \
i386/i386/trap.h \
i386/i386/tss.h \
@@ -134,7 +138,8 @@ libkernel_a_SOURCES += \
i386/i386/zalloc.h \
i386/intel/pmap.c \
i386/intel/pmap.h \
- i386/intel/read_fault.c
+ i386/intel/read_fault.c \
+ i386/intel/read_fault.h
EXTRA_DIST += \
i386/i386/mach_i386.srv
@@ -240,4 +245,8 @@ EXTRA_DIST += \
if PLATFORM_xen
include i386/xen/Makefrag.am
+
+libkernel_a_SOURCES += \
+ i386/i386/xen.h
+
endif
diff --git a/i386/i386at/boothdr.S b/i386/i386at/boothdr.S
index 27d0405..45cd599 100644
--- a/i386/i386at/boothdr.S
+++ b/i386/i386at/boothdr.S
@@ -58,6 +58,23 @@ boot_entry:
/* Push the boot_info pointer to be the second argument. */
pushl %ebx
+ /* Fix ifunc entries */
+ movl $__rel_iplt_start,%esi
+ movl $__rel_iplt_end,%edi
+iplt_cont:
+ cmpl %edi,%esi
+ jae iplt_done
+ movl (%esi),%ebx /* r_offset */
+ movb 4(%esi),%al /* info */
+ cmpb $42,%al /* IRELATIVE */
+ jnz iplt_next
+ call *(%ebx) /* call ifunc */
+ movl %eax,(%ebx) /* fixed address */
+iplt_next:
+ addl $8,%esi
+ jmp iplt_cont
+iplt_done:
+
/* Jump into C code. */
call EXT(c_boot_entry)
diff --git a/i386/ldscript b/i386/ldscript
index 7e4e3b0..f2b90fa 100644
--- a/i386/ldscript
+++ b/i386/ldscript
@@ -3,14 +3,8 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386",
"elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
-SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
SECTIONS
{
- .init :
- {
- KEEP (*(.init))
- } =0x90909090
- .plt : { *(.plt) }
/*
* There are specific requirements about entry points, so we have it
* configurable via `_START': `.text' will begin there and `.text.start' will
@@ -22,10 +16,15 @@ SECTIONS
{
*(.text.start)
*(.text .stub .text.* .gnu.linkonce.t.*)
+ *(.text.unlikely .text.*_unlikely)
KEEP (*(.text.*personality*))
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
} =0x90909090
+ .init :
+ {
+ KEEP (*(.init))
+ } =0x90909090
.fini :
{
KEEP (*(.fini))
@@ -37,39 +36,35 @@ SECTIONS
/* Read-only sections, merged into text segment: */
PROVIDE (__executable_start = .);
.interp : { *(.interp) }
+ .note.gnu.build-id : { *(.note.gnu.build-id) }
.hash : { *(.hash) }
+ .gnu.hash : { *(.gnu.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version : { *(.gnu.version) }
.gnu.version_d : { *(.gnu.version_d) }
.gnu.version_r : { *(.gnu.version_r) }
.rel.init : { *(.rel.init) }
- .rela.init : { *(.rela.init) }
.rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
- .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
.rel.fini : { *(.rel.fini) }
- .rela.fini : { *(.rela.fini) }
.rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
- .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
.rel.data.rel.ro : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
- .rela.data.rel.ro : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
.rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
- .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
.rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
- .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
.rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
- .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
.rel.ctors : { *(.rel.ctors) }
- .rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
- .rela.dtors : { *(.rela.dtors) }
.rel.got : { *(.rel.got) }
- .rela.got : { *(.rela.got) }
.rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
- .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
- .rel.plt : { *(.rel.plt) }
- .rela.plt : { *(.rela.plt) }
-
+ .rel.ifunc : { *(.rel.ifunc) }
+ .rel.plt :
+ {
+ *(.rel.plt)
+ PROVIDE_HIDDEN (__rel_iplt_start = .);
+ *(.rel.iplt)
+ PROVIDE_HIDDEN (__rel_iplt_end = .);
+ }
+ .plt : { *(.plt) *(.iplt) }
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
.rodata1 : { *(.rodata1) }
.eh_frame_hdr : { *(.eh_frame_hdr) }
@@ -77,7 +72,7 @@ SECTIONS
.gcc_except_table : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
- . = ALIGN (0x1000) - ((0x1000 - .) & (0x1000 - 1)); . = DATA_SEGMENT_ALIGN (0x1000, 0x1000);
+ . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
/* Exception handling */
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) }
.gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
@@ -100,8 +95,8 @@ SECTIONS
.fini_array :
{
PROVIDE_HIDDEN (__fini_array_start = .);
- KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
+ KEEP (*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);
}
.ctors :
@@ -115,32 +110,33 @@ SECTIONS
wildcard. The wildcard also means that it
doesn't matter which directory crtbegin.o
is in. */
- KEEP (*crtbegin*.o(.ctors))
+ KEEP (*crtbegin.o(.ctors))
+ KEEP (*crtbegin?.o(.ctors))
/* We don't want to include the .ctor section from
the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
}
.dtors :
{
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*crtbegin?.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
}
.jcr : { KEEP (*(.jcr)) }
.data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
.dynamic : { *(.dynamic) }
- .got : { *(.got) }
+ .got : { *(.got) *(.igot) }
. = DATA_SEGMENT_RELRO_END (12, .);
- .got.plt : { *(.got.plt) }
+ .got.plt : { *(.got.plt) *(.igot.plt) }
.data :
{
*(.data .data.* .gnu.linkonce.d.*)
- KEEP (*(.gnu.linkonce.d.*personality*))
SORT(CONSTRUCTORS)
}
.data1 : { *(.data1) }
@@ -195,5 +191,9 @@ SECTIONS
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
- /DISCARD/ : { *(.note.GNU-stack) }
+ /* DWARF 3 */
+ .debug_pubtypes 0 : { *(.debug_pubtypes) }
+ .debug_ranges 0 : { *(.debug_ranges) }
+ .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
+ /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
}
diff --git a/i386/xen/xen_boothdr.S b/i386/xen/xen_boothdr.S
index 3d84e0c..604e13b 100644
--- a/i386/xen/xen_boothdr.S
+++ b/i386/xen/xen_boothdr.S
@@ -90,6 +90,23 @@ _start:
subl $KERNELBASE,%esi
pushl %esi
+ /* Fix ifunc entries */
+ movl $__rel_iplt_start,%esi
+ movl $__rel_iplt_end,%edi
+iplt_cont:
+ cmpl %edi,%esi
+ jae iplt_done
+ movl (%esi),%ebx /* r_offset */
+ movb 4(%esi),%al /* info */
+ cmpb $42,%al /* IRELATIVE */
+ jnz iplt_next
+ call *(%ebx) /* call ifunc */
+ movl %eax,(%ebx) /* fixed address */
+iplt_next:
+ addl $8,%esi
+ jmp iplt_cont
+iplt_done:
+
/* Jump into C code. */
call EXT(c_boot_entry)
diff --git a/linux/Makefrag.am b/linux/Makefrag.am
index 52bc890..fccb807 100644
--- a/linux/Makefrag.am
+++ b/linux/Makefrag.am
@@ -528,7 +528,8 @@ endif
if device_driver_sis900
liblinux_a_SOURCES += \
- linux/src/drivers/net/sis900.c
+ linux/src/drivers/net/sis900.c \
+ linux/src/drivers/net/sis900.h
endif
if device_driver_sk_g16
diff --git a/linux/src/drivers/pci/pci.c b/linux/src/drivers/pci/pci.c
index bb79cc4..cf7dd80 100644
--- a/linux/src/drivers/pci/pci.c
+++ b/linux/src/drivers/pci/pci.c
@@ -1121,10 +1121,8 @@ static unsigned int scan_bus(struct pci_bus *bus, unsigned long *mem_startp)
pcibios_read_config_dword(bus->number, devfn, PCI_VENDOR_ID, &l);
/* some broken boards return 0 if a slot is empty: */
- if (l == 0xffffffff || l == 0x00000000) {
- is_multi = 0;
+ if (l == 0xffffffff || l == 0x00000000 || l == 0x0000ffff || l == 0xffff0000)
continue;
- }
dev = pci_malloc(sizeof(*dev), mem_startp);
dev->bus = bus;
diff --git a/xen/Makefrag.am b/xen/Makefrag.am
index c5792a9..61eb475 100644
--- a/xen/Makefrag.am
+++ b/xen/Makefrag.am
@@ -21,12 +21,63 @@
#
libkernel_a_SOURCES += \
+ xen/public/arch-x86_32.h \
+ xen/public/arch-x86_64.h \
+ xen/public/arch-x86/xen.h \
+ xen/public/arch-x86/xen-mca.h \
+ xen/public/arch-x86/xen-x86_32.h \
+ xen/public/arch-x86/xen-x86_64.h \
+ xen/public/callback.h \
+ xen/public/COPYING \
+ xen/public/dom0_ops.h \
+ xen/public/domctl.h \
+ xen/public/elfnote.h \
+ xen/public/elfstructs.h \
+ xen/public/event_channel.h \
+ xen/public/features.h \
+ xen/public/grant_table.h \
+ xen/public/io/blkif.h \
+ xen/public/io/console.h \
+ xen/public/io/fbif.h \
+ xen/public/io/fsif.h \
+ xen/public/io/kbdif.h \
+ xen/public/io/netif.h \
+ xen/public/io/pciif.h \
+ xen/public/io/protocols.h \
+ xen/public/io/ring.h \
+ xen/public/io/tpmif.h \
+ xen/public/io/xenbus.h \
+ xen/public/io/xs_wire.h \
+ xen/public/kexec.h \
+ xen/public/libelf.h \
+ xen/public/memory.h \
+ xen/public/nmi.h \
+ xen/public/physdev.h \
+ xen/public/platform.h \
+ xen/public/sched.h \
+ xen/public/sysctl.h \
+ xen/public/trace.h \
+ xen/public/vcpu.h \
+ xen/public/version.h \
+ xen/public/xencomm.h \
+ xen/public/xen-compat.h \
+ xen/public/xen.h \
+ xen/public/xenoprof.h \
xen/block.c \
+ xen/block.h \
xen/console.c \
+ xen/console.h \
xen/evt.c \
+ xen/evt.h \
xen/grant.c \
+ xen/grant.h \
xen/net.c \
+ xen/net.h \
xen/ring.c \
+ xen/ring.h \
xen/store.c \
+ xen/store.h \
xen/time.c \
- xen/xen.c
+ xen/time.h \
+ xen/xen.c \
+ xen/xen.h