Initial attempt at getting Linux QMAGIC shared lib support. I have
successfully run linux netscape 2.0b3 with a QMAGIC ld.so and libc/libm that I found on some linux machine that I _think_ is running slackware 3.0. There are still problems.. ld.so claims the libraries are the wrong format, but it still runs anyway.. :-/ The QMAGIC ld.so also screams about needing ld.so.cache, and running a linux ldconfig is quite educational. You soon learn to run "chroot /compat/linux /bin/ldconfig" where ldconfig is living in /compat/linux/bin. :-] (Lets just say that it puts loads of symlinks in /usr/lib otherwise :-)
This commit is contained in:
parent
f98905c343
commit
9d6192fef3
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_misc.c,v 1.7 1995/12/14 22:35:45 bde Exp $
|
||||
* $Id: linux_misc.c,v 1.8 1995/12/15 03:06:54 peter Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -255,11 +255,11 @@ linux_uselib(struct proc *p, struct linux_uselib_args *args, int *retval)
|
||||
*/
|
||||
switch ((int)(a_out->a_magic & 0xffff)) {
|
||||
case 0413: /* ZMAGIC */
|
||||
virtual_offset = 0;
|
||||
virtual_offset = 0; /* actually aout->a_entry */
|
||||
file_offset = 1024;
|
||||
break;
|
||||
case 0314: /* QMAGIC */
|
||||
virtual_offset = 4096;
|
||||
virtual_offset = 0; /* actually aout->a_entry */
|
||||
file_offset = 0;
|
||||
break;
|
||||
default:
|
||||
@ -311,7 +311,7 @@ printf("uselib: Non page aligned binary %d\n", file_offset);
|
||||
#ifdef DEBUG
|
||||
printf("uselib: Page aligned binary %d\n", file_offset);
|
||||
#endif
|
||||
vmaddr = virtual_offset + round_page(a_out->a_entry);
|
||||
vmaddr = virtual_offset + trunc_page(a_out->a_entry);
|
||||
error = vm_mmap(&p->p_vmspace->vm_map, &vmaddr,
|
||||
a_out->a_text + a_out->a_data,
|
||||
VM_PROT_ALL, VM_PROT_ALL, MAP_PRIVATE | MAP_FIXED,
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: linux_misc.c,v 1.7 1995/12/14 22:35:45 bde Exp $
|
||||
* $Id: linux_misc.c,v 1.8 1995/12/15 03:06:54 peter Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -255,11 +255,11 @@ linux_uselib(struct proc *p, struct linux_uselib_args *args, int *retval)
|
||||
*/
|
||||
switch ((int)(a_out->a_magic & 0xffff)) {
|
||||
case 0413: /* ZMAGIC */
|
||||
virtual_offset = 0;
|
||||
virtual_offset = 0; /* actually aout->a_entry */
|
||||
file_offset = 1024;
|
||||
break;
|
||||
case 0314: /* QMAGIC */
|
||||
virtual_offset = 4096;
|
||||
virtual_offset = 0; /* actually aout->a_entry */
|
||||
file_offset = 0;
|
||||
break;
|
||||
default:
|
||||
@ -311,7 +311,7 @@ printf("uselib: Non page aligned binary %d\n", file_offset);
|
||||
#ifdef DEBUG
|
||||
printf("uselib: Page aligned binary %d\n", file_offset);
|
||||
#endif
|
||||
vmaddr = virtual_offset + round_page(a_out->a_entry);
|
||||
vmaddr = virtual_offset + trunc_page(a_out->a_entry);
|
||||
error = vm_mmap(&p->p_vmspace->vm_map, &vmaddr,
|
||||
a_out->a_text + a_out->a_data,
|
||||
VM_PROT_ALL, VM_PROT_ALL, MAP_PRIVATE | MAP_FIXED,
|
||||
|
Loading…
Reference in New Issue
Block a user