:> :> Can somebody who is feeling adventurous and has an alpha box please :> test whether this fixes it for now? : :Nope, if anything it's now worse. :( We should perhaps revert this :change in -stable until we can get it to work in -current. FWIW, with :the patch all sorts of programs no longer work including find, :rpc.lockd, cron, sendmail, getty, etc., not just static c++ programs. : :-- : :John Baldwin <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/ :"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
Lets try just reverting the algorithm, and keeping the RLIMIT stuff intact. Here's the patch for -current. Please review. -Matt Index: imgact_elf.c =================================================================== RCS file: /home/ncvs/src/sys/kern/imgact_elf.c,v retrieving revision 1.124 diff -u -r1.124 imgact_elf.c --- imgact_elf.c 2 Sep 2002 17:27:30 -0000 1.124 +++ imgact_elf.c 3 Sep 2002 21:11:01 -0000 @@ -734,20 +734,23 @@ phdr[i].p_vaddr - seg_addr); /* - * Is this .text or .data? Use VM_PROT_WRITE - * to distinguish between the two for the purpose - * of limit checking and vmspace fields. + * Is this .text or .data? We can't use + * VM_PROT_WRITE or VM_PROT_EXEC, it breaks the + * alpha terribly and possibly does other bad + * things so we stick with the address check. */ - if (prot & VM_PROT_WRITE) { - data_size += seg_size; - if (data_addr == 0) - data_addr = seg_addr; + + /* Does the entry point belong to this segment? */ + if (hdr->e_entry >= phdr[i].p_vaddr && + hdr->e_entry < (phdr[i].p_vaddr + + phdr[i].p_memsz)) { + entry = (u_long)hdr->e_entry; + text_size = seg_size; + text_addr = seg_addr; } else { - text_size += seg_size; - if (text_addr == 0) - text_addr = seg_addr; + data_size = seg_size; + data_addr = seg_addr; } - /* * Check limits. It should be safe to check the * limits after loading the segment since we do @@ -762,12 +765,6 @@ goto fail; } - /* Does the entry point belong to this segment? */ - if (hdr->e_entry >= phdr[i].p_vaddr && - hdr->e_entry < (phdr[i].p_vaddr + - phdr[i].p_memsz)) { - entry = (u_long)hdr->e_entry; - } break; case PT_PHDR: /* Program header table info */ proghdr = phdr[i].p_vaddr; To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message