{
udi_init_t *info;
char *udiprops = NULL;
- int udiprops_size = 0;
+ Uint udiprops_size = 0;
int i;
// int j;
if( Binary_FindSymbol(Base, "_udiprops", (Uint*)&udiprops) == 0 ) {
Log_Warning("UDI", "_udiprops is not defined, this is usually bad");
}
+ else if( Binary_FindSymbol(Base, "_udiprops_size", &udiprops_size) == 0) {
+ Log_Warning("UDI", "_udiprops_size is not defined");
+ }
else {
- Uint udiprops_end = 0;
int i, j, nLines;
char **udipropsptrs;
- if( Binary_FindSymbol(Base, "_udiprops_end", (Uint*)&udiprops_end) == 0)
- Log_Warning("UDI", "_udiprops_end is not defined");
- Log_Debug("UDI", "udiprops_end = %p", udiprops_end);
- udiprops_size = udiprops_end - (Uint)udiprops;
Log_Debug("UDI", "udiprops = %p, udiprops_size = 0x%x", udiprops, udiprops_size);
Debug_HexDump("UDI_LoadDriver", udiprops, udiprops_size);
--- /dev/null
+#!/bin/sh
+
+TMPFILE=/tmp/acess_udisetup.tmp
+
+if echo $0 | grep '/' >/dev/null; then
+ THISFILE=$(which $0)
+ THISDIR=$(dirname ${THISFILE})/
+else
+ _=$PWD; cd $(dirname $0); THISDIR=$PWD/; cd $_
+fi
+ACESSDIR=${THISDIR}../../
+
+ARCH=ia32
+PREFIX=i586-elf
+
+UDI_INSTALL_DIR=${ACESSDIR}UDI/${ARCH}/
+
+mkdir -p ${UDI_INSTALL_DIR}
+for file in $(tar -tf $1 --wildcards */bin/${ARCH}/*); do
+ tar -xf $1 $file -O > $TMPFILE
+ ${PREFIX}-ld -T ${THISDIR}udisetup-${ARCH}.ld $TMPFILE -shared -o ${UDI_INSTALL_DIR}$(basename $file)
+done
--- /dev/null
+OUTPUT_FORMAT(elf32-i386)
+
+SECTIONS
+{
+ . = 0 + SIZEOF_HEADERS;
+
+ .text : AT(ADDR(.text)) {
+ textzero = .;
+ *(.text)
+ }
+
+ .rodata ALIGN(0x1000): AT(ADDR(.rodata)) {
+ *(.rodata)
+ *(.rdata)
+ }
+
+ .data ALIGN (0x1000) : AT(ADDR(.data)) {
+ *(.data)
+ _udiprops = .;
+ *(.udiprops)
+ _udiprops_size = . - _udiprops;
+ }
+
+ .bss : AT(ADDR(.bss)) {
+ _sbss = .;
+ *(COMMON)
+ *(.bss)
+ _ebss = .;
+ }
+}
+