PERFORCE change 50247 for review

Doug Rabson dfr at FreeBSD.org
Sat Apr 3 01:43:15 PST 2004


http://perforce.freebsd.org/chv.cgi?CH=50247

Change 50247 by dfr at dfr_home on 2004/04/03 01:43:04

	Set the segment size to 4G so that the local exec tls model works.

Affected files ...

.. //depot/projects/kse/libexec/rtld-elf/i386/reloc.c#3 edit

Differences ...

==== //depot/projects/kse/libexec/rtld-elf/i386/reloc.c#3 (text+ko) ====

@@ -368,14 +368,14 @@
     }
 
     memset(&ldt, 0, sizeof(ldt));
-    ldt.sd.sd_lolimit = 4;
+    ldt.sd.sd_lolimit = 0xffff;	/* 4G limit */
     ldt.sd.sd_lobase = segbase & 0xffffff;
     ldt.sd.sd_type = SDT_MEMRWA;
     ldt.sd.sd_dpl = SEL_UPL;
     ldt.sd.sd_p = 1;		/* present */
-    ldt.sd.sd_hilimit = 0;
+    ldt.sd.sd_hilimit = 0xf;	/* 4G limit */
     ldt.sd.sd_def32 = 1;	/* 32 bit */
-    ldt.sd.sd_gran = 0;		/* limit in bytes */
+    ldt.sd.sd_gran = 1;		/* limit in pages */
     ldt.sd.sd_hibase = (segbase >> 24) & 0xff;
     sel = i386_set_ldt(LDT_AUTO_ALLOC, &ldt, 1);
     __asm __volatile("movl %0,%%gs" : : "rm" ((sel << 3) | 7));


More information about the p4-projects mailing list