Print this page
uts: Allow for address space randomisation.
Randomise the base addresses of shared objects, non-fixed mappings, the
stack and the heap. Introduce a service, svc:/system/process-security,
and a tool psecflags(1) to control and observe it
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libc/i386/Makefile.com
+++ new/usr/src/lib/libc/i386/Makefile.com
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
23 23 # Copyright (c) 2015, Joyent, Inc. All rights reserved.
24 24 # Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
25 25 # Copyright 2013 Garrett D'Amore <garrett@damore.org>
26 26 #
27 27 # Copyright 2011 Nexenta Systems, Inc. All rights reserved.
28 28 # Use is subject to license terms.
29 29 #
30 30
31 31 LIBCDIR= $(SRC)/lib/libc
32 32 LIB_PIC= libc_pic.a
33 33 VERS= .1
34 34 CPP= /usr/lib/cpp
35 35 TARGET_ARCH= i386
36 36
37 37 VALUES= values-Xa.o
38 38
39 39 # objects are grouped by source directory
40 40
41 41 # local objects
42 42 STRETS=
43 43
44 44 CRTOBJS= \
45 45 cerror.o \
46 46 cerror64.o
47 47
48 48 DYNOBJS= \
49 49 _rtbootld.o
50 50
51 51 FPOBJS= \
52 52 _D_cplx_div.o \
53 53 _D_cplx_div_ix.o \
54 54 _D_cplx_div_rx.o \
55 55 _D_cplx_lr_div.o \
56 56 _D_cplx_lr_div_ix.o \
57 57 _D_cplx_lr_div_rx.o \
58 58 _D_cplx_mul.o \
59 59 _F_cplx_div.o \
60 60 _F_cplx_div_ix.o \
61 61 _F_cplx_div_rx.o \
62 62 _F_cplx_lr_div.o \
63 63 _F_cplx_lr_div_ix.o \
64 64 _F_cplx_lr_div_rx.o \
65 65 _F_cplx_mul.o \
66 66 _X_cplx_div.o \
67 67 _X_cplx_div_ix.o \
68 68 _X_cplx_div_rx.o \
69 69 _X_cplx_lr_div.o \
70 70 _X_cplx_lr_div_ix.o \
71 71 _X_cplx_lr_div_rx.o \
72 72 _X_cplx_mul.o \
73 73 fpgetmask.o \
74 74 fpgetround.o \
75 75 fpgetsticky.o \
76 76 fpsetmask.o \
77 77 fpsetround.o \
78 78 fpsetsticky.o \
79 79 fpstart.o \
80 80 ieee.o
81 81
82 82 FPASMOBJS= \
83 83 __xgetRD.o \
84 84 _base_il.o \
85 85 _xtoll.o \
86 86 _xtoull.o \
87 87 fpcw.o
88 88
89 89 ATOMICOBJS= \
90 90 atomic.o
91 91
92 92 CHACHAOBJS= \
93 93 chacha.o
94 94
95 95 XATTROBJS= \
96 96 xattr_common.o
97 97
98 98 COMOBJS= \
99 99 bcmp.o \
100 100 bcopy.o \
101 101 bsearch.o \
102 102 bzero.o \
103 103 qsort.o \
104 104 strtol.o \
105 105 strtoul.o \
106 106 strtoll.o \
107 107 strtoull.o
108 108
109 109 DTRACEOBJS= \
110 110 dtrace_data.o
111 111
112 112 GENOBJS= \
113 113 _div64.o \
114 114 _divdi3.o \
115 115 _getsp.o \
116 116 _mul64.o \
117 117 abs.o \
118 118 alloca.o \
119 119 arc4random.o \
120 120 arc4random_uniform.o \
121 121 byteorder.o \
122 122 byteorder64.o \
123 123 cuexit.o \
124 124 ecvt.o \
125 125 errlst.o \
126 126 i386_data.o \
127 127 ladd.o \
128 128 ldivide.o \
129 129 lmul.o \
130 130 lock.o \
131 131 lshiftl.o \
132 132 lsign.o \
133 133 lsub.o \
134 134 makectxt.o \
135 135 memccpy.o \
136 136 memchr.o \
137 137 memcmp.o \
138 138 memcpy.o \
139 139 memset.o \
140 140 new_list.o \
141 141 setjmp.o \
142 142 siginfolst.o \
143 143 siglongjmp.o \
144 144 strcat.o \
145 145 strchr.o \
146 146 strcmp.o \
147 147 strcpy.o \
148 148 strlen.o \
149 149 strncat.o \
150 150 strncmp.o \
151 151 strncpy.o \
152 152 strnlen.o \
153 153 strrchr.o \
154 154 sync_instruction_memory.o
155 155
156 156 # sysobjs that contain large-file interfaces
157 157 COMSYSOBJS64= \
158 158 fstatvfs64.o \
159 159 getdents64.o \
160 160 getrlimit64.o \
161 161 lseek64.o \
162 162 mmap64.o \
163 163 pread64.o \
164 164 preadv64.o \
165 165 pwrite64.o \
166 166 pwritev64.o \
167 167 setrlimit64.o \
168 168 statvfs64.o
169 169
170 170 SYSOBJS64=
171 171
172 172 COMSYSOBJS= \
173 173 __clock_timer.o \
174 174 __getloadavg.o \
175 175 __rusagesys.o \
176 176 __signotify.o \
177 177 __sigrt.o \
178 178 __time.o \
179 179 _lgrp_home_fast.o \
180 180 _lgrpsys.o \
181 181 _nfssys.o \
182 182 _portfs.o \
183 183 _pset.o \
184 184 _rpcsys.o \
185 185 _sigaction.o \
186 186 _so_accept.o \
187 187 _so_bind.o \
188 188 _so_connect.o \
189 189 _so_getpeername.o \
190 190 _so_getsockname.o \
191 191 _so_getsockopt.o \
192 192 _so_listen.o \
193 193 _so_recv.o \
194 194 _so_recvfrom.o \
195 195 _so_recvmsg.o \
196 196 _so_send.o \
197 197 _so_sendmsg.o \
198 198 _so_sendto.o \
199 199 _so_setsockopt.o \
200 200 _so_shutdown.o \
201 201 _so_socket.o \
202 202 _so_socketpair.o \
203 203 _sockconfig.o \
204 204 acct.o \
205 205 acl.o \
206 206 adjtime.o \
207 207 alarm.o \
208 208 brk.o \
209 209 chdir.o \
210 210 chroot.o \
211 211 cladm.o \
212 212 close.o \
213 213 execve.o \
214 214 exit.o \
215 215 facl.o \
216 216 fchdir.o \
217 217 fchroot.o \
218 218 fdsync.o \
219 219 fpathconf.o \
220 220 fstatfs.o \
221 221 fstatvfs.o \
222 222 getcpuid.o \
223 223 getdents.o \
224 224 getegid.o \
225 225 geteuid.o \
226 226 getgid.o \
227 227 getgroups.o \
228 228 gethrtime.o \
229 229 getitimer.o \
230 230 getmsg.o \
231 231 getpid.o \
232 232 getpmsg.o \
233 233 getppid.o \
234 234 getrandom.o \
235 235 getrlimit.o \
236 236 getuid.o \
237 237 gtty.o \
238 238 install_utrap.o \
239 239 ioctl.o \
240 240 kaio.o \
241 241 kill.o \
242 242 llseek.o \
243 243 lseek.o \
244 244 mmapobjsys.o \
245 245 memcntl.o \
246 246 mincore.o \
247 247 mmap.o \
248 248 modctl.o \
249 249 mount.o \
250 250 mprotect.o \
251 251 munmap.o \
252 252 nice.o \
253 253 ntp_adjtime.o \
254 254 ntp_gettime.o \
255 255 p_online.o \
256 256 pathconf.o \
↓ open down ↓ |
256 lines elided |
↑ open up ↑ |
257 257 pause.o \
258 258 pcsample.o \
259 259 pipe2.o \
260 260 pollsys.o \
261 261 pread.o \
262 262 preadv.o \
263 263 priocntlset.o \
264 264 processor_bind.o \
265 265 processor_info.o \
266 266 profil.o \
267 + psecflagsset.o \
267 268 putmsg.o \
268 269 putpmsg.o \
269 270 pwrite.o \
270 271 pwritev.o \
271 272 read.o \
272 273 readv.o \
273 274 resolvepath.o \
274 275 seteguid.o \
275 276 setgid.o \
276 277 setgroups.o \
277 278 setitimer.o \
278 279 setreid.o \
279 280 setrlimit.o \
280 281 setuid.o \
281 282 sigaltstk.o \
282 283 sigprocmsk.o \
283 284 sigsendset.o \
284 285 sigsuspend.o \
285 286 statfs.o \
286 287 statvfs.o \
287 288 stty.o \
288 289 sync.o \
289 290 sysconfig.o \
290 291 sysfs.o \
291 292 sysinfo.o \
292 293 syslwp.o \
293 294 times.o \
294 295 ulimit.o \
295 296 umask.o \
296 297 umount2.o \
297 298 utssys.o \
298 299 uucopy.o \
299 300 vhangup.o \
300 301 waitid.o \
301 302 write.o \
302 303 writev.o \
303 304 yield.o
304 305
305 306 SYSOBJS= \
306 307 __clock_gettime.o \
307 308 __getcontext.o \
308 309 __uadmin.o \
309 310 _lwp_mutex_unlock.o \
310 311 _stack_grow.o \
311 312 door.o \
312 313 forkx.o \
313 314 forkallx.o \
314 315 getcontext.o \
315 316 gettimeofday.o \
316 317 lwp_private.o \
317 318 nuname.o \
318 319 ptrace.o \
319 320 syscall.o \
320 321 sysi86.o \
321 322 tls_get_addr.o \
322 323 uadmin.o \
323 324 umount.o \
324 325 uname.o \
325 326 vforkx.o \
326 327 xstat.o
327 328
328 329 # objects under $(LIBCDIR)/port which contain transitional large file interfaces
329 330 PORTGEN64= \
330 331 _xftw64.o \
331 332 attropen64.o \
332 333 ftw64.o \
333 334 mkstemp64.o \
334 335 nftw64.o \
335 336 tell64.o \
336 337 truncate64.o
337 338
338 339 # objects from source under $(LIBCDIR)/port
339 340 PORTFP= \
340 341 __flt_decim.o \
341 342 __flt_rounds.o \
342 343 __tbl_10_b.o \
343 344 __tbl_10_h.o \
344 345 __tbl_10_s.o \
345 346 __tbl_2_b.o \
346 347 __tbl_2_h.o \
347 348 __tbl_2_s.o \
348 349 __tbl_fdq.o \
349 350 __tbl_tens.o \
350 351 __x_power.o \
351 352 _base_sup.o \
352 353 aconvert.o \
353 354 decimal_bin.o \
354 355 double_decim.o \
355 356 econvert.o \
356 357 fconvert.o \
357 358 file_decim.o \
358 359 finite.o \
359 360 fp_data.o \
360 361 func_decim.o \
361 362 gconvert.o \
362 363 hex_bin.o \
363 364 ieee_globals.o \
364 365 pack_float.o \
365 366 sigfpe.o \
366 367 string_decim.o
367 368
368 369 PORTGEN= \
369 370 _env_data.o \
370 371 _xftw.o \
371 372 a64l.o \
372 373 abort.o \
373 374 addsev.o \
374 375 ascii_strcasecmp.o \
375 376 ascii_strncasecmp.o \
376 377 assert.o \
377 378 atof.o \
378 379 atoi.o \
379 380 atol.o \
380 381 atoll.o \
381 382 attrat.o \
382 383 attropen.o \
383 384 atexit.o \
384 385 atfork.o \
385 386 basename.o \
386 387 calloc.o \
387 388 catgets.o \
388 389 catopen.o \
389 390 cfgetispeed.o \
390 391 cfgetospeed.o \
391 392 cfree.o \
392 393 cfsetispeed.o \
393 394 cfsetospeed.o \
394 395 cftime.o \
395 396 clock.o \
396 397 closedir.o \
397 398 closefrom.o \
398 399 confstr.o \
399 400 crypt.o \
400 401 csetlen.o \
401 402 ctime.o \
402 403 ctime_r.o \
403 404 daemon.o \
404 405 deflt.o \
405 406 directio.o \
406 407 dirname.o \
407 408 div.o \
408 409 drand48.o \
409 410 dup.o \
410 411 env_data.o \
411 412 err.o \
412 413 errno.o \
413 414 euclen.o \
414 415 event_port.o \
415 416 execvp.o \
416 417 explicit_bzero.o \
417 418 fattach.o \
418 419 fdetach.o \
419 420 fdopendir.o \
420 421 ffs.o \
421 422 fls.o \
422 423 fmtmsg.o \
423 424 ftime.o \
424 425 ftok.o \
425 426 ftw.o \
426 427 gcvt.o \
427 428 getauxv.o \
428 429 getcwd.o \
429 430 getdate_err.o \
430 431 getdtblsize.o \
431 432 getentropy.o \
432 433 getenv.o \
433 434 getexecname.o \
434 435 getgrnam.o \
435 436 getgrnam_r.o \
436 437 gethostid.o \
437 438 gethostname.o \
438 439 gethz.o \
439 440 getisax.o \
440 441 getloadavg.o \
441 442 getlogin.o \
442 443 getmntent.o \
443 444 getnetgrent.o \
444 445 get_nprocs.o \
445 446 getopt.o \
446 447 getopt_long.o \
447 448 getpagesize.o \
448 449 getpw.o \
449 450 getpwnam.o \
450 451 getpwnam_r.o \
451 452 getrusage.o \
452 453 getspent.o \
453 454 getspent_r.o \
454 455 getsubopt.o \
455 456 gettxt.o \
456 457 getusershell.o \
457 458 getut.o \
458 459 getutx.o \
459 460 getvfsent.o \
460 461 getwd.o \
461 462 getwidth.o \
462 463 getxby_door.o \
463 464 gtxt.o \
464 465 hsearch.o \
465 466 iconv.o \
466 467 imaxabs.o \
467 468 imaxdiv.o \
468 469 index.o \
469 470 initgroups.o \
470 471 insque.o \
471 472 isaexec.o \
472 473 isastream.o \
473 474 isatty.o \
474 475 killpg.o \
475 476 klpdlib.o \
476 477 l64a.o \
477 478 lckpwdf.o \
478 479 lconstants.o \
479 480 lexp10.o \
480 481 lfind.o \
481 482 lfmt.o \
482 483 lfmt_log.o \
483 484 llabs.o \
484 485 lldiv.o \
485 486 llog10.o \
486 487 lltostr.o \
487 488 localtime.o \
488 489 lsearch.o \
489 490 madvise.o \
490 491 malloc.o \
491 492 memalign.o \
492 493 memmem.o \
493 494 mkdev.o \
494 495 mkdtemp.o \
495 496 mkfifo.o \
496 497 mkstemp.o \
497 498 mktemp.o \
498 499 mlock.o \
499 500 mlockall.o \
500 501 mon.o \
501 502 msync.o \
502 503 munlock.o \
503 504 munlockall.o \
504 505 ndbm.o \
505 506 nftw.o \
506 507 nlspath_checks.o \
507 508 nsparse.o \
508 509 nss_common.o \
509 510 nss_dbdefs.o \
510 511 nss_deffinder.o \
511 512 opendir.o \
512 513 opt_data.o \
513 514 perror.o \
514 515 pfmt.o \
515 516 pfmt_data.o \
516 517 pfmt_print.o \
↓ open down ↓ |
240 lines elided |
↑ open up ↑ |
517 518 pipe.o \
518 519 plock.o \
519 520 poll.o \
520 521 posix_fadvise.o \
521 522 posix_fallocate.o \
522 523 posix_madvise.o \
523 524 posix_memalign.o \
524 525 priocntl.o \
525 526 privlib.o \
526 527 priv_str_xlate.o \
528 + psecflags.o \
527 529 psiginfo.o \
528 530 psignal.o \
529 531 pt.o \
530 532 putpwent.o \
531 533 putspent.o \
532 534 raise.o \
533 535 rand.o \
534 536 random.o \
535 537 rctlops.o \
536 538 readdir.o \
537 539 readdir_r.o \
538 540 realpath.o \
539 541 reboot.o \
540 542 regexpr.o \
541 543 remove.o \
542 544 rewinddir.o \
543 545 rindex.o \
544 546 scandir.o \
545 547 seekdir.o \
546 548 select.o \
547 549 select_large_fdset.o \
548 550 setlabel.o \
549 551 setpriority.o \
550 552 settimeofday.o \
551 553 sh_locks.o \
552 554 sigflag.o \
553 555 siglist.o \
554 556 sigsend.o \
555 557 sigsetops.o \
556 558 ssignal.o \
557 559 stack.o \
558 560 stpcpy.o \
559 561 stpncpy.o \
560 562 str2sig.o \
561 563 strcase_charmap.o \
562 564 strchrnul.o \
563 565 strcspn.o \
564 566 strdup.o \
565 567 strerror.o \
566 568 strlcat.o \
567 569 strlcpy.o \
568 570 strndup.o \
569 571 strpbrk.o \
570 572 strsep.o \
571 573 strsignal.o \
572 574 strspn.o \
573 575 strstr.o \
574 576 strtod.o \
575 577 strtoimax.o \
576 578 strtok.o \
577 579 strtok_r.o \
578 580 strtoumax.o \
579 581 swab.o \
580 582 swapctl.o \
581 583 sysconf.o \
582 584 syslog.o \
583 585 tcdrain.o \
584 586 tcflow.o \
585 587 tcflush.o \
586 588 tcgetattr.o \
587 589 tcgetpgrp.o \
588 590 tcgetsid.o \
589 591 tcsendbreak.o \
590 592 tcsetattr.o \
591 593 tcsetpgrp.o \
592 594 tell.o \
593 595 telldir.o \
594 596 tfind.o \
595 597 time_data.o \
596 598 time_gdata.o \
597 599 tls_data.o \
598 600 truncate.o \
599 601 tsdalloc.o \
600 602 tsearch.o \
601 603 ttyname.o \
602 604 ttyslot.o \
603 605 ualarm.o \
604 606 ucred.o \
605 607 valloc.o \
606 608 vlfmt.o \
607 609 vpfmt.o \
608 610 waitpid.o \
609 611 walkstack.o \
610 612 wdata.o \
611 613 xgetwidth.o \
612 614 xpg4.o \
613 615 xpg6.o
614 616
615 617 PORTPRINT_W= \
616 618 doprnt_w.o
617 619
618 620 PORTPRINT= \
619 621 asprintf.o \
620 622 doprnt.o \
621 623 fprintf.o \
622 624 printf.o \
623 625 snprintf.o \
624 626 sprintf.o \
625 627 vfprintf.o \
626 628 vprintf.o \
627 629 vsnprintf.o \
628 630 vsprintf.o \
629 631 vwprintf.o \
630 632 wprintf.o
631 633
632 634 # c89 variants to support 32-bit size of c89 u/intmax_t (32-bit libc only)
633 635 PORTPRINT_C89= \
634 636 vfprintf_c89.o \
635 637 vprintf_c89.o \
636 638 vsnprintf_c89.o \
637 639 vsprintf_c89.o \
638 640 vwprintf_c89.o
639 641
640 642 PORTSTDIO_C89= \
641 643 vscanf_c89.o \
642 644 vwscanf_c89.o \
643 645
644 646 # portable stdio objects that contain large file interfaces.
645 647 # Note: fopen64 is a special case, as we build it small.
646 648 PORTSTDIO64= \
647 649 fopen64.o \
648 650 fpos64.o
649 651
650 652 PORTSTDIO_W= \
651 653 doscan_w.o
652 654
653 655 PORTSTDIO= \
654 656 __extensions.o \
655 657 _endopen.o \
656 658 _filbuf.o \
657 659 _findbuf.o \
658 660 _flsbuf.o \
659 661 _wrtchk.o \
660 662 clearerr.o \
661 663 ctermid.o \
662 664 ctermid_r.o \
663 665 cuserid.o \
664 666 data.o \
665 667 doscan.o \
666 668 fdopen.o \
667 669 feof.o \
668 670 ferror.o \
669 671 fgetc.o \
670 672 fgets.o \
671 673 fileno.o \
672 674 flockf.o \
673 675 flush.o \
674 676 fopen.o \
675 677 fpos.o \
676 678 fputc.o \
677 679 fputs.o \
678 680 fread.o \
679 681 fseek.o \
680 682 fseeko.o \
681 683 ftell.o \
682 684 ftello.o \
683 685 fwrite.o \
684 686 getc.o \
685 687 getchar.o \
686 688 getline.o \
687 689 getpass.o \
688 690 gets.o \
689 691 getw.o \
690 692 mse.o \
691 693 popen.o \
692 694 putc.o \
693 695 putchar.o \
694 696 puts.o \
695 697 putw.o \
696 698 rewind.o \
697 699 scanf.o \
698 700 setbuf.o \
699 701 setbuffer.o \
700 702 setvbuf.o \
701 703 system.o \
702 704 tempnam.o \
703 705 tmpfile.o \
704 706 tmpnam_r.o \
705 707 ungetc.o \
706 708 vscanf.o \
707 709 vwscanf.o \
708 710 wscanf.o
709 711
710 712 PORTI18N= \
711 713 getwchar.o \
712 714 putwchar.o \
713 715 putws.o \
714 716 strtows.o \
715 717 wcsnlen.o \
716 718 wcsstr.o \
717 719 wcstoimax.o \
718 720 wcstol.o \
719 721 wcstoul.o \
720 722 wcswcs.o \
721 723 wmemchr.o \
722 724 wmemcmp.o \
723 725 wmemcpy.o \
724 726 wmemmove.o \
725 727 wmemset.o \
726 728 wscat.o \
727 729 wschr.o \
728 730 wscmp.o \
729 731 wscpy.o \
730 732 wscspn.o \
731 733 wsdup.o \
732 734 wslen.o \
733 735 wsncat.o \
734 736 wsncmp.o \
735 737 wsncpy.o \
736 738 wspbrk.o \
737 739 wsprintf.o \
738 740 wsrchr.o \
739 741 wsscanf.o \
740 742 wsspn.o \
741 743 wstod.o \
742 744 wstok.o \
743 745 wstol.o \
744 746 wstoll.o \
745 747 wsxfrm.o \
746 748 gettext.o \
747 749 gettext_gnu.o \
748 750 gettext_real.o \
749 751 gettext_util.o \
750 752 plural_parser.o \
751 753 wdresolve.o \
752 754 _ctype.o \
753 755 isascii.o \
754 756 toascii.o
755 757
756 758 PORTI18N_COND= \
757 759 wcstol_longlong.o \
758 760 wcstoul_longlong.o
759 761
760 762 PORTLOCALE= \
761 763 big5.o \
762 764 btowc.o \
763 765 collate.o \
764 766 collcmp.o \
765 767 euc.o \
766 768 fnmatch.o \
767 769 fgetwc.o \
768 770 fgetws.o \
769 771 fix_grouping.o \
770 772 fputwc.o \
771 773 fputws.o \
772 774 fwide.o \
773 775 gb18030.o \
774 776 gb2312.o \
775 777 gbk.o \
776 778 getdate.o \
777 779 isdigit.o \
778 780 iswctype.o \
779 781 ldpart.o \
780 782 lmessages.o \
781 783 lnumeric.o \
782 784 lmonetary.o \
783 785 localeconv.o \
784 786 localeimpl.o \
785 787 mbftowc.o \
786 788 mblen.o \
787 789 mbrlen.o \
788 790 mbrtowc.o \
789 791 mbsinit.o \
790 792 mbsnrtowcs.o \
791 793 mbsrtowcs.o \
792 794 mbstowcs.o \
793 795 mbtowc.o \
794 796 mskanji.o \
795 797 nextwctype.o \
796 798 nl_langinfo.o \
797 799 none.o \
798 800 regcomp.o \
799 801 regfree.o \
800 802 regerror.o \
801 803 regexec.o \
802 804 rune.o \
803 805 runetype.o \
804 806 setlocale.o \
805 807 setrunelocale.o \
806 808 strcasecmp.o \
807 809 strcasestr.o \
808 810 strcoll.o \
809 811 strfmon.o \
810 812 strftime.o \
811 813 strncasecmp.o \
812 814 strptime.o \
813 815 strxfrm.o \
814 816 table.o \
815 817 timelocal.o \
816 818 tolower.o \
817 819 towlower.o \
818 820 ungetwc.o \
819 821 utf8.o \
820 822 wcrtomb.o \
821 823 wcscasecmp.o \
822 824 wcscoll.o \
823 825 wcsftime.o \
824 826 wcsnrtombs.o \
825 827 wcsrtombs.o \
826 828 wcswidth.o \
827 829 wcstombs.o \
828 830 wcsxfrm.o \
829 831 wctob.o \
830 832 wctomb.o \
831 833 wctrans.o \
832 834 wctype.o \
833 835 wcwidth.o \
834 836 wscol.o
835 837
836 838 AIOOBJS= \
837 839 aio.o \
838 840 aio_alloc.o \
839 841 posix_aio.o
840 842
841 843 RTOBJS= \
842 844 clock_timer.o \
843 845 mqueue.o \
844 846 pos4obj.o \
845 847 sched.o \
846 848 sem.o \
847 849 shm.o \
848 850 sigev_thread.o
849 851
850 852 TPOOLOBJS= \
851 853 thread_pool.o
852 854
853 855 THREADSOBJS= \
854 856 alloc.o \
855 857 assfail.o \
856 858 cancel.o \
857 859 door_calls.o \
858 860 tmem.o \
859 861 pthr_attr.o \
860 862 pthr_barrier.o \
861 863 pthr_cond.o \
862 864 pthr_mutex.o \
863 865 pthr_rwlock.o \
864 866 pthread.o \
865 867 rwlock.o \
866 868 scalls.o \
867 869 sema.o \
868 870 sigaction.o \
869 871 spawn.o \
870 872 synch.o \
871 873 tdb_agent.o \
872 874 thr.o \
873 875 thread_interface.o \
874 876 tls.o \
875 877 tsd.o
876 878
877 879 THREADSMACHOBJS= \
878 880 machdep.o
879 881
880 882 THREADSASMOBJS= \
881 883 asm_subr.o
882 884
883 885 UNICODEOBJS= \
884 886 u8_textprep.o \
885 887 uconv.o
886 888
887 889 UNWINDMACHOBJS= \
888 890 unwind.o
889 891
890 892 UNWINDASMOBJS= \
891 893 unwind_frame.o
892 894
893 895 # objects that implement the transitional large file API
894 896 PORTSYS64= \
895 897 lockf64.o \
896 898 stat64.o
897 899
898 900 PORTSYS= \
899 901 _autofssys.o \
900 902 access.o \
901 903 acctctl.o \
902 904 bsd_signal.o \
903 905 chmod.o \
904 906 chown.o \
905 907 corectl.o \
906 908 exacctsys.o \
907 909 execl.o \
908 910 execle.o \
909 911 execv.o \
910 912 fcntl.o \
911 913 getpagesizes.o \
912 914 getpeerucred.o \
913 915 inst_sync.o \
914 916 issetugid.o \
915 917 label.o \
916 918 link.o \
917 919 lockf.o \
918 920 lwp.o \
919 921 lwp_cond.o \
920 922 lwp_rwlock.o \
921 923 lwp_sigmask.o \
922 924 meminfosys.o \
923 925 mkdir.o \
924 926 mknod.o \
925 927 msgsys.o \
926 928 nfssys.o \
927 929 open.o \
928 930 pgrpsys.o \
929 931 posix_sigwait.o \
930 932 ppriv.o \
931 933 psetsys.o \
932 934 rctlsys.o \
933 935 readlink.o \
934 936 rename.o \
935 937 sbrk.o \
936 938 semsys.o \
937 939 set_errno.o \
938 940 sharefs.o \
939 941 shmsys.o \
940 942 sidsys.o \
941 943 siginterrupt.o \
942 944 signal.o \
943 945 sigpending.o \
944 946 sigstack.o \
945 947 stat.o \
946 948 symlink.o \
947 949 tasksys.o \
948 950 time.o \
949 951 time_util.o \
950 952 ucontext.o \
951 953 unlink.o \
952 954 ustat.o \
953 955 utimesys.o \
954 956 zone.o
955 957
956 958 PORTREGEX= \
957 959 glob.o \
958 960 regcmp.o \
959 961 regex.o \
960 962 wordexp.o
961 963
962 964 MOSTOBJS= \
963 965 $(STRETS) \
964 966 $(CRTOBJS) \
965 967 $(DYNOBJS) \
966 968 $(FPOBJS) \
967 969 $(FPASMOBJS) \
968 970 $(ATOMICOBJS) \
969 971 $(CHACHAOBJS) \
970 972 $(XATTROBJS) \
971 973 $(COMOBJS) \
972 974 $(DTRACEOBJS) \
973 975 $(GENOBJS) \
974 976 $(PORTFP) \
975 977 $(PORTGEN) \
976 978 $(PORTGEN64) \
977 979 $(PORTI18N) \
978 980 $(PORTI18N_COND) \
979 981 $(PORTLOCALE) \
980 982 $(PORTPRINT) \
981 983 $(PORTPRINT_C89) \
982 984 $(PORTPRINT_W) \
983 985 $(PORTREGEX) \
984 986 $(PORTSTDIO) \
985 987 $(PORTSTDIO64) \
986 988 $(PORTSTDIO_C89) \
987 989 $(PORTSTDIO_W) \
988 990 $(PORTSYS) \
989 991 $(PORTSYS64) \
990 992 $(AIOOBJS) \
991 993 $(RTOBJS) \
992 994 $(TPOOLOBJS) \
993 995 $(THREADSOBJS) \
994 996 $(THREADSMACHOBJS) \
995 997 $(THREADSASMOBJS) \
996 998 $(UNICODEOBJS) \
997 999 $(UNWINDMACHOBJS) \
998 1000 $(UNWINDASMOBJS) \
999 1001 $(COMSYSOBJS) \
1000 1002 $(SYSOBJS) \
1001 1003 $(COMSYSOBJS64) \
1002 1004 $(SYSOBJS64) \
1003 1005 $(VALUES)
1004 1006
1005 1007 TRACEOBJS= \
1006 1008 plockstat.o
1007 1009
1008 1010 # NOTE: libc.so.1 must be linked with the minimal crti.o and crtn.o
1009 1011 # modules whose source is provided in the $(SRC)/lib/common directory.
1010 1012 # This must be done because otherwise the Sun C compiler would insert
1011 1013 # its own versions of these modules and those versions contain code
1012 1014 # to call out to C++ initialization functions. Such C++ initialization
1013 1015 # functions can call back into libc before thread initialization is
1014 1016 # complete and this leads to segmentation violations and other problems.
1015 1017 # Since libc contains no C++ code, linking with the minimal crti.o and
1016 1018 # crtn.o modules is safe and avoids the problems described above.
1017 1019 OBJECTS= $(CRTI) $(MOSTOBJS) $(CRTN)
1018 1020 CRTSRCS= ../../common/i386
1019 1021
1020 1022 LDPASS_OFF= $(POUND_SIGN)
1021 1023
1022 1024 # include common library definitions
1023 1025 include ../../Makefile.lib
1024 1026
1025 1027 # we need to override the default SONAME here because we might
1026 1028 # be building a variant object (still libc.so.1, but different filename)
1027 1029 SONAME = libc.so.1
1028 1030
1029 1031 CFLAGS += $(CCVERBOSE) $(CTF_FLAGS)
1030 1032
1031 1033 # This is necessary to avoid problems with calling _ex_unwind().
1032 1034 # We probably don't want any inlining anyway.
1033 1035 XINLINE = -xinline=
1034 1036 CFLAGS += $(XINLINE)
1035 1037
1036 1038 CERRWARN += -_gcc=-Wno-parentheses
1037 1039 CERRWARN += -_gcc=-Wno-switch
1038 1040 CERRWARN += -_gcc=-Wno-uninitialized
1039 1041 CERRWARN += -_gcc=-Wno-unused-value
1040 1042 CERRWARN += -_gcc=-Wno-unused-label
1041 1043 CERRWARN += -_gcc=-Wno-unused-variable
1042 1044 CERRWARN += -_gcc=-Wno-type-limits
1043 1045 CERRWARN += -_gcc=-Wno-char-subscripts
1044 1046 CERRWARN += -_gcc=-Wno-clobbered
1045 1047 CERRWARN += -_gcc=-Wno-unused-function
1046 1048 CERRWARN += -_gcc=-Wno-address
1047 1049
1048 1050 # Setting THREAD_DEBUG = -DTHREAD_DEBUG (make THREAD_DEBUG=-DTHREAD_DEBUG ...)
1049 1051 # enables ASSERT() checking in the threads portion of the library.
1050 1052 # This is automatically enabled for DEBUG builds, not for non-debug builds.
1051 1053 THREAD_DEBUG =
1052 1054 $(NOT_RELEASE_BUILD)THREAD_DEBUG = -DTHREAD_DEBUG
1053 1055
1054 1056 # Make string literals read-only to save memory.
1055 1057 CFLAGS += $(XSTRCONST)
1056 1058
1057 1059 ALTPICS= $(TRACEOBJS:%=pics/%)
1058 1060
1059 1061 $(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) \
1060 1062 $(EXTPICS) $(LDLIBS)
1061 1063
1062 1064 MAPFILES = $(LIBCDIR)/port/mapfile-vers
1063 1065
1064 1066 #
1065 1067 # EXTN_CPPFLAGS and EXTN_CFLAGS set in enclosing Makefile
1066 1068 #
1067 1069 CFLAGS += $(EXTN_CFLAGS)
1068 1070 CPPFLAGS= -D_REENTRANT -Di386 $(EXTN_CPPFLAGS) $(THREAD_DEBUG) \
1069 1071 -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc $(CPPFLAGS.master)
1070 1072 ASFLAGS= $(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(CPPFLAGS) $(i386_AS_XARCH)
1071 1073
1072 1074 # As a favor to the dtrace syscall provider, libc still calls the
1073 1075 # old syscall traps that have been obsoleted by the *at() interfaces.
1074 1076 # Delete this to compile libc using only the new *at() system call traps
1075 1077 CPPFLAGS += -D_RETAIN_OLD_SYSCALLS
1076 1078
1077 1079 # Inform the run-time linker about libc specialized initialization
1078 1080 RTLDINFO = -z rtldinfo=tls_rtldinfo
1079 1081 DYNFLAGS += $(RTLDINFO)
1080 1082
1081 1083 # Force libc's internal references to be resolved immediately upon loading
1082 1084 # in order to avoid critical region problems. Since almost all libc symbols
1083 1085 # are marked 'protected' in the mapfiles, this is a minimal set (15 to 20).
1084 1086 DYNFLAGS += -znow
1085 1087
1086 1088 DYNFLAGS += -e __rtboot
1087 1089 DYNFLAGS += $(EXTN_DYNFLAGS)
1088 1090
1089 1091 # Inform the kernel about the initial DTrace area (in case
1090 1092 # libc is being used as the interpreter / runtime linker).
1091 1093 DTRACE_DATA = -zdtrace=dtrace_data
1092 1094 DYNFLAGS += $(DTRACE_DATA)
1093 1095
1094 1096 # DTrace needs an executable data segment.
1095 1097 MAPFILE.NED=
1096 1098
1097 1099 BUILD.s= $(AS) $(ASFLAGS) $< -o $@
1098 1100
1099 1101 # Override this top level flag so the compiler builds in its native
1100 1102 # C99 mode. This has been enabled to support the complex arithmetic
1101 1103 # added to libc.
1102 1104 C99MODE= $(C99_ENABLE)
1103 1105
1104 1106 # libc method of building an archive
1105 1107 # The "$(GREP) -v ' L '" part is necessary only until
1106 1108 # lorder is fixed to ignore thread-local variables.
1107 1109 BUILD.AR= $(RM) $@ ; \
1108 1110 $(AR) q $@ `$(LORDER) $(MOSTOBJS:%=$(DIR)/%) | $(GREP) -v ' L ' | $(TSORT)`
1109 1111
1110 1112 # extra files for the clean target
1111 1113 CLEANFILES= \
1112 1114 $(LIBCDIR)/port/gen/errlst.c \
1113 1115 $(LIBCDIR)/port/gen/new_list.c \
1114 1116 assym.h \
1115 1117 genassym \
1116 1118 crt/_rtld.s \
1117 1119 crt/_rtbootld.s \
1118 1120 pics/_rtbootld.o \
1119 1121 pics/crti.o \
1120 1122 pics/crtn.o \
1121 1123 $(ALTPICS)
1122 1124
1123 1125 CLOBBERFILES += $(LIB_PIC)
1124 1126
1125 1127 # list of C source for lint
1126 1128 SRCS= \
1127 1129 $(ATOMICOBJS:%.o=$(SRC)/common/atomic/%.c) \
1128 1130 $(XATTROBJS:%.o=$(SRC)/common/xattr/%.c) \
1129 1131 $(COMOBJS:%.o=$(SRC)/common/util/%.c) \
1130 1132 $(DTRACEOBJS:%.o=$(SRC)/common/dtrace/%.c) \
1131 1133 $(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c) \
1132 1134 $(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c) \
1133 1135 $(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c) \
1134 1136 $(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c) \
1135 1137 $(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c) \
1136 1138 $(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c) \
1137 1139 $(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c) \
1138 1140 $(PORTSYS:%.o=$(LIBCDIR)/port/sys/%.c) \
1139 1141 $(AIOOBJS:%.o=$(LIBCDIR)/port/aio/%.c) \
1140 1142 $(RTOBJS:%.o=$(LIBCDIR)/port/rt/%.c) \
1141 1143 $(TPOOLOBJS:%.o=$(LIBCDIR)/port/tpool/%.c) \
1142 1144 $(THREADSOBJS:%.o=$(LIBCDIR)/port/threads/%.c) \
1143 1145 $(THREADSMACHOBJS:%.o=$(LIBCDIR)/$(MACH)/threads/%.c) \
1144 1146 $(UNICODEOBJS:%.o=$(SRC)/common/unicode/%.c) \
1145 1147 $(UNWINDMACHOBJS:%.o=$(LIBCDIR)/port/unwind/%.c) \
1146 1148 $(FPOBJS:%.o=$(LIBCDIR)/$(MACH)/fp/%.c) \
1147 1149 $(LIBCBASE)/gen/ecvt.c \
1148 1150 $(LIBCBASE)/gen/makectxt.c \
1149 1151 $(LIBCBASE)/gen/siginfolst.c \
1150 1152 $(LIBCBASE)/gen/siglongjmp.c \
1151 1153 $(LIBCBASE)/gen/strcmp.c \
1152 1154 $(LIBCBASE)/gen/sync_instruction_memory.c \
1153 1155 $(LIBCBASE)/sys/ptrace.c \
1154 1156 $(LIBCBASE)/sys/uadmin.c
1155 1157
1156 1158 # conditional assignments
1157 1159 $(DYNLIB) := CRTI = crti.o
1158 1160 $(DYNLIB) := CRTN = crtn.o
1159 1161
1160 1162 # Files which need the threads .il inline template
1161 1163 TIL= \
1162 1164 aio.o \
1163 1165 alloc.o \
1164 1166 assfail.o \
1165 1167 atexit.o \
1166 1168 atfork.o \
1167 1169 cancel.o \
1168 1170 door_calls.o \
1169 1171 err.o \
1170 1172 errno.o \
1171 1173 lwp.o \
1172 1174 ma.o \
1173 1175 machdep.o \
1174 1176 posix_aio.o \
1175 1177 pthr_attr.o \
1176 1178 pthr_barrier.o \
1177 1179 pthr_cond.o \
1178 1180 pthr_mutex.o \
1179 1181 pthr_rwlock.o \
1180 1182 pthread.o \
1181 1183 rand.o \
1182 1184 rwlock.o \
1183 1185 scalls.o \
1184 1186 sched.o \
1185 1187 sema.o \
1186 1188 sigaction.o \
1187 1189 sigev_thread.o \
1188 1190 spawn.o \
1189 1191 stack.o \
1190 1192 synch.o \
1191 1193 tdb_agent.o \
1192 1194 thr.o \
1193 1195 thread_interface.o \
1194 1196 thread_pool.o \
1195 1197 tls.o \
1196 1198 tsd.o \
1197 1199 tmem.o \
1198 1200 unwind.o
1199 1201
1200 1202 THREADS_INLINES = $(LIBCBASE)/threads/i386.il
1201 1203 $(TIL:%=pics/%) := CFLAGS += $(THREADS_INLINES)
1202 1204
1203 1205 # pics/mul64.o := CFLAGS += $(LIBCBASE)/crt/mul64.il
1204 1206
1205 1207 # large-file-aware components that should be built large
1206 1208
1207 1209 $(COMSYSOBJS64:%=pics/%) := \
1208 1210 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1209 1211
1210 1212 $(SYSOBJS64:%=pics/%) := \
1211 1213 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1212 1214
1213 1215 $(PORTGEN64:%=pics/%) := \
1214 1216 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1215 1217
1216 1218 $(PORTSTDIO64:%=pics/%) := \
1217 1219 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1218 1220
1219 1221 $(PORTSYS64:%=pics/%) := \
1220 1222 CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
1221 1223
1222 1224 $(PORTSTDIO_W:%=pics/%) := \
1223 1225 CPPFLAGS += -D_WIDE
1224 1226
1225 1227 $(PORTPRINT_W:%=pics/%) := \
1226 1228 CPPFLAGS += -D_WIDE
1227 1229
1228 1230 $(PORTPRINT_C89:%=pics/%) := \
1229 1231 CPPFLAGS += -D_C89_INTMAX32
1230 1232
1231 1233 $(PORTSTDIO_C89:%=pics/%) := \
1232 1234 CPPFLAGS += -D_C89_INTMAX32
1233 1235
1234 1236 $(PORTI18N_COND:%=pics/%) := \
1235 1237 CPPFLAGS += -D_WCS_LONGLONG
1236 1238
1237 1239 pics/arc4random.o := CPPFLAGS += -I$(SRC)/common/crypto/chacha
1238 1240
1239 1241 .KEEP_STATE:
1240 1242
1241 1243 all: $(LIBS) $(LIB_PIC)
1242 1244
1243 1245 lint := CPPFLAGS += -I$(LIBCDIR)/$(MACH)/fp
1244 1246 lint := CPPFLAGS += -D_MSE_INT_H -D_LCONV_C99
1245 1247 lint := LINTFLAGS += -mn -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
1246 1248
1247 1249 lint:
1248 1250 @echo $(LINT.c) ...
1249 1251 @$(LINT.c) $(SRCS) $(LDLIBS)
1250 1252
1251 1253 $(LINTLIB):= SRCS=$(LIBCDIR)/port/llib-lc
1252 1254 $(LINTLIB):= CPPFLAGS += -D_MSE_INT_H
1253 1255 $(LINTLIB):= LINTFLAGS=-nvx
1254 1256
1255 1257 # object files that depend on inline template
1256 1258 $(TIL:%=pics/%): $(LIBCBASE)/threads/i386.il
1257 1259 # pics/mul64.o: $(LIBCBASE)/crt/mul64.il
1258 1260
1259 1261 # include common libc targets
1260 1262 include $(LIBCDIR)/Makefile.targ
1261 1263
1262 1264 # We need to strip out all CTF and DOF data from the static library
1263 1265 $(LIB_PIC) := DIR = pics
1264 1266 $(LIB_PIC): pics $$(PICS)
1265 1267 $(BUILD.AR)
1266 1268 $(MCS) -d -n .SUNW_ctf $@ > /dev/null 2>&1
1267 1269 $(MCS) -d -n .SUNW_dof $@ > /dev/null 2>&1
1268 1270 $(AR) -ts $@ > /dev/null
1269 1271 $(POST_PROCESS_A)
1270 1272
1271 1273 $(LIBCBASE)/crt/_rtbootld.s: $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.c
1272 1274 $(CC) $(CPPFLAGS) $(CTF_FLAGS) -O -S $(C_PICFLAGS) \
1273 1275 $(LIBCBASE)/crt/_rtld.c -o $(LIBCBASE)/crt/_rtld.s
1274 1276 $(CAT) $(LIBCBASE)/crt/_rtboot.s $(LIBCBASE)/crt/_rtld.s > $@
1275 1277 $(RM) $(LIBCBASE)/crt/_rtld.s
1276 1278
1277 1279 # partially built from C source
1278 1280 pics/_rtbootld.o: $(LIBCBASE)/crt/_rtbootld.s
1279 1281 $(AS) $(ASFLAGS) $(LIBCBASE)/crt/_rtbootld.s -o $@
1280 1282 $(CTFCONVERT_O)
1281 1283
1282 1284 ASSYMDEP_OBJS= \
1283 1285 _lwp_mutex_unlock.o \
1284 1286 _stack_grow.o \
1285 1287 getcontext.o \
1286 1288 setjmp.o \
1287 1289 tls_get_addr.o \
1288 1290 vforkx.o
1289 1291
1290 1292 $(ASSYMDEP_OBJS:%=pics/%) := CPPFLAGS += -I.
1291 1293
1292 1294 $(ASSYMDEP_OBJS:%=pics/%): assym.h
1293 1295
1294 1296 # assym.h build rules
1295 1297
1296 1298 GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c
1297 1299
1298 1300 genassym: $(GENASSYM_C)
1299 1301 $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
1300 1302 -D__EXTENSIONS__ $(CPPFLAGS.native) -o $@ $(GENASSYM_C)
1301 1303
1302 1304 OFFSETS = $(LIBCDIR)/$(MACH)/offsets.in
1303 1305
1304 1306 assym.h: $(OFFSETS) genassym
1305 1307 $(OFFSETS_CREATE) <$(OFFSETS) >$@
1306 1308 ./genassym >>$@
1307 1309
1308 1310 # derived C source and related explicit dependencies
1309 1311 $(LIBCDIR)/port/gen/errlst.c + \
1310 1312 $(LIBCDIR)/port/gen/new_list.c: $(LIBCDIR)/port/gen/errlist $(LIBCDIR)/port/gen/errlist.awk
1311 1313 cd $(LIBCDIR)/port/gen; pwd; $(AWK) -f errlist.awk < errlist
1312 1314
1313 1315 pics/errlst.o: $(LIBCDIR)/port/gen/errlst.c
1314 1316
1315 1317 pics/new_list.o: $(LIBCDIR)/port/gen/new_list.c
↓ open down ↓ |
779 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX