| 1 |
\" Hey, EMACS: -*- nroff -*- |
| 2 |
.\" Copyright 2012 Cray Inc. |
| 3 |
.\" All rights reserved. |
| 4 |
.\" Licensed under LGPL 2.1 by Cray Inc. |
| 5 |
.\" |
| 6 |
.\" First parameter, NAME, should be all caps |
| 7 |
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection |
| 8 |
.\" other parameters are allowed: see man(7), man(1) |
| 9 |
.TH LD.HUGETLBFS 1 "March 12, 2012" |
| 10 |
.\" Please adjust this date whenever revising the manpage. |
| 11 |
.\" |
| 12 |
.\" Some roff macros, for reference: |
| 13 |
.\" .nh disable hyphenation |
| 14 |
.\" .hy enable hyphenation |
| 15 |
.\" .ad l left justify |
| 16 |
.\" .ad b justify to both left and right margins |
| 17 |
.\" .nf disable filling |
| 18 |
.\" .fi enable filling |
| 19 |
.\" .br insert line break |
| 20 |
.\" .sp <n> insert n+1 empty lines |
| 21 |
.\" for manpage-specific macros, see man(7) |
| 22 |
.SH NAME |
| 23 |
ld.hugetlbfs \- link a program for huge pages |
| 24 |
.SH SYNOPSIS |
| 25 |
.B ld.hugetlbfs [options] |
| 26 |
.SH DESCRIPTION |
| 27 |
|
| 28 |
\fBld.hugetlbfs\fP replaces the normal \fBld\fP command for linking programs |
| 29 |
to use hugepages. Under gcc, you should use the option |
| 30 |
\fB-B /usr/share/libhugetlbfs\fP which tells gcc to look in a non-standard |
| 31 |
location for the linker. This could be set in the \fBCFLAGS\fP environment |
| 32 |
variable. |
| 33 |
|
| 34 |
.TP |
| 35 |
.B -Wl,--hugetlbfs-align |
| 36 |
|
| 37 |
This method of linking an application permits greater flexibility at runtime. |
| 38 |
Using HUGETLB_ELFMAP, it is possible to control which program segments are |
| 39 |
placed in hugepages. The following four settings will cause the indicated |
| 40 |
segments to be placed in hugepages: |
| 41 |
|
| 42 |
HUGETLB_ELFMAP=R Read-only segments (text) |
| 43 |
HUGETLB_ELFMAP=W Writable segments (data/BSS) |
| 44 |
HUGETLB_ELFMAP=RW All segments (text/data/BSS) |
| 45 |
HUGETLB_ELFMAP=no No segments |
| 46 |
|
| 47 |
It is possible to select specific huge page sizes for read-only and writable |
| 48 |
segments by using the following advanced syntax: |
| 49 |
|
| 50 |
HUGETLB_ELFMAP=[R[=<pagesize>]:[W[=<pagesize>]] |
| 51 |
|
| 52 |
.B -Wl,--hugetlbfs-link=B |
| 53 |
|
| 54 |
Under binutils 2.16 or older, this option will link the application to store |
| 55 |
BSS data (only) into hugepages. |
| 56 |
|
| 57 |
.B -Wl,--hugetlbfs-link=BDT |
| 58 |
|
| 59 |
Under binutils 2.16 or older, this option will link the application to store |
| 60 |
text, initialized data and BSS data into hugepages. |
| 61 |
|
| 62 |
.SH FILES |
| 63 |
[DESTDIR|/usr/share]/doc/libhugetlbfs/HOWTO |
| 64 |
|
| 65 |
.SH SEE ALSO |
| 66 |
.I libhugetlbfs(7), |
| 67 |
.I hugectl(8), |
| 68 |
.I hugeedit(8) |
| 69 |
.br |
| 70 |
.SH AUTHORS |
| 71 |
libhugetlbfs was written by various people on the libhugetlbfs-devel |
| 72 |
mailing list. |