锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久国产精品久久久,久久人人爽人人爽人人片AV不,久久高潮一级毛片免费http://www.shnenglu.com/huyi/category/1054.html&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ------ Keep life simple<br> GMail/GTalk/MSN:huyi.zg@gmail.comzh-cnWed, 28 May 2008 14:11:52 GMTWed, 28 May 2008 14:11:52 GMT60Linux鍚姩鍗忚Ver.2.04http://www.shnenglu.com/huyi/archive/2006/06/20/8745.htmlHuYiHuYiTue, 20 Jun 2006 06:46:00 GMThttp://www.shnenglu.com/huyi/archive/2006/06/20/8745.htmlhttp://www.shnenglu.com/huyi/comments/8745.htmlhttp://www.shnenglu.com/huyi/archive/2006/06/20/8745.html#Feedback0http://www.shnenglu.com/huyi/comments/commentRss/8745.htmlhttp://www.shnenglu.com/huyi/services/trackbacks/8745.html聽聽聽聽聽聽 THE LINUX/I386 BOOT PROTOCOL
聽聽聽聽聽聽 ----------------------------

聽聽聽聽聽 H. Peter Anvin <hpa@zytor.com>
聽聽聽Last update 2005-09-02

On the i386 platform, the Linux kernel uses a rather complicated boot
convention.聽 This has evolved partially due to historical aspects, as
well as the desire in the early days to have the kernel itself be a
bootable image, the complicated PC memory model and due to changed
expectations in the PC industry caused by the effective demise of
real-mode DOS as a mainstream operating system.

Currently, four versions of the Linux/i386 boot protocol exist.

Old kernels:聽zImage/Image support only.聽 Some very early kernels
聽聽may not even support a command line.

Protocol 2.00:聽(Kernel 1.3.73) Added bzImage and initrd support, as
聽聽well as a formalized way to communicate between the
聽聽boot loader and the kernel.聽 setup.S made relocatable,
聽聽although the traditional setup area still assumed
聽聽writable.

Protocol 2.01:聽(Kernel 1.3.76) Added a heap overrun warning.

Protocol 2.02:聽(Kernel 2.4.0-test3-pre3) New command line protocol.
聽聽Lower the conventional memory ceiling.聽No overwrite
聽聽of the traditional setup area, thus making booting
聽聽safe for systems which use the EBDA from SMM or 32-bit
聽聽BIOS entry points.聽 zImage deprecated but still
聽聽supported.

Protocol 2.03:聽(Kernel 2.4.18-pre1) Explicitly makes the highest possible
聽聽initrd address available to the bootloader.

Protocol 2.04:聽(Kernel 2.6.14) Extend the syssize field to four bytes.


**** MEMORY LAYOUT

The traditional memory map for the kernel loader, used for Image or
zImage kernels, typically looks like:

聽|聽聽聽 |
0A0000聽+------------------------+
聽|聽 Reserved for BIOS聽 |聽Do not use.聽 Reserved for BIOS EBDA.
09A000聽+------------------------+
聽|聽 Stack/heap/cmdline聽 |聽For use by the kernel real-mode code.
098000聽+------------------------+聽
聽|聽 Kernel setup聽聽 |聽The kernel real-mode code.
090200聽+------------------------+
聽|聽 Kernel boot sector聽 |聽The kernel legacy boot sector.
090000聽+------------------------+
聽|聽 Protected-mode kernel |聽The bulk of the kernel image.
010000聽+------------------------+
聽|聽 Boot loader聽聽 |聽<- Boot sector entry point 0000:7C00
001000聽+------------------------+
聽|聽 Reserved for MBR/BIOS |
000800聽+------------------------+
聽|聽 Typically used by MBR |
000600聽+------------------------+
聽|聽 BIOS use only聽 |
000000聽+------------------------+


When using bzImage, the protected-mode kernel was relocated to
0x100000 ("high memory"), and the kernel real-mode block (boot sector,
setup, and stack/heap) was made relocatable to any address between
0x10000 and end of low memory.聽Unfortunately, in protocols 2.00 and
2.01 the command line is still required to live in the 0x9XXXX memory
range, and that memory range is still overwritten by the early kernel.
The 2.02 protocol resolves that problem.

It is desirable to keep the "memory ceiling" -- the highest point in
low memory touched by the boot loader -- as low as possible, since
some newer BIOSes have begun to allocate some rather large amounts of
memory, called the Extended BIOS Data Area, near the top of low
memory.聽 The boot loader should use the "INT 12h" BIOS call to verify
how much low memory is available.

Unfortunately, if INT 12h reports that the amount of memory is too
low, there is usually nothing the boot loader can do but to report an
error to the user.聽 The boot loader should therefore be designed to
take up as little space in low memory as it reasonably can.聽 For
zImage or old bzImage kernels, which need data written into the
0x90000 segment, the boot loader should make sure not to use memory
above the 0x9A000 point; too many BIOSes will break above that point.


**** THE REAL-MODE KERNEL HEADER

In the following text, and anywhere in the kernel boot sequence, "a
sector" refers to 512 bytes.聽 It is independent of the actual sector
size of the underlying medium.

The first step in loading a Linux kernel should be to load the
real-mode code (boot sector and setup code) and then examine the
following header at offset 0x01f1.聽 The real-mode code can total up to
32K, although the boot loader may choose to load only the first two
sectors (1K) and then examine the bootup sector size.

The header looks like:

Offset聽Proto聽Name聽聽Meaning
/Size

01F1/1聽ALL(1聽setup_sects聽The size of the setup in sectors
01F2/2聽ALL聽root_flags聽I(yíng)f set, the root is mounted readonly
01F4/4聽2.04+(2聽syssize聽聽The size of the 32-bit code in 16-byte paras
01F8/2聽ALL聽ram_size聽DO NOT USE - for bootsect.S use only
01FA/2聽ALL聽vid_mode聽Video mode control
01FC/2聽ALL聽root_dev聽Default root device number
01FE/2聽ALL聽boot_flag聽0xAA55 magic number
0200/2聽2.00+聽jump聽聽Jump instruction
0202/4聽2.00+聽header聽聽Magic signature "HdrS"
0206/2聽2.00+聽version聽聽Boot protocol version supported
0208/4聽2.00+聽realmode_swtch聽Boot loader hook (see below)
020C/2聽2.00+聽start_sys聽The load-low segment (0x1000) (obsolete)
020E/2聽2.00+聽kernel_version聽Pointer to kernel version string
0210/1聽2.00+聽type_of_loader聽Boot loader identifier
0211/1聽2.00+聽loadflags聽Boot protocol option flags
0212/2聽2.00+聽setup_move_size聽Move to high memory size (used with hooks)
0214/4聽2.00+聽code32_start聽Boot loader hook (see below)
0218/4聽2.00+聽ramdisk_image聽initrd load address (set by boot loader)
021C/4聽2.00+聽ramdisk_size聽initrd size (set by boot loader)
0220/4聽2.00+聽bootsect_kludge聽DO NOT USE - for bootsect.S use only
0224/2聽2.01+聽heap_end_ptr聽Free memory after setup end
0226/2聽N/A聽pad1聽聽Unused
0228/4聽2.02+聽cmd_line_ptr聽32-bit pointer to the kernel command line
022C/4聽2.03+聽initrd_addr_max聽Highest legal initrd address

(1) For backwards compatibility, if the setup_sects field contains 0, the
聽聽聽 real value is 4.

(2) For boot protocol prior to 2.04, the upper two bytes of the syssize
聽聽聽 field are unusable, which means the size of a bzImage kernel
聽聽聽 cannot be determined.

If the "HdrS" (0x53726448) magic number is not found at offset 0x202,
the boot protocol version is "old".聽 Loading an old kernel, the
following parameters should be assumed:

聽I(yíng)mage type = zImage
聽initrd not supported
聽Real-mode kernel must be located at 0x90000.

Otherwise, the "version" field contains the protocol version,
e.g. protocol version 2.01 will contain 0x0201 in this field.聽 When
setting fields in the header, you must make sure only to set fields
supported by the protocol version in use.

The "kernel_version" field, if set to a nonzero value, contains a
pointer to a null-terminated human-readable kernel version number
string, less 0x200.聽 This can be used to display the kernel version to
the user.聽 This value should be less than (0x200*setup_sects).聽 For
example, if this value is set to 0x1c00, the kernel version number
string can be found at offset 0x1e00 in the kernel file.聽 This is a
valid value if and only if the "setup_sects" field contains the value
14 or higher.

Most boot loaders will simply load the kernel at its target address
directly.聽 Such boot loaders do not need to worry about filling in
most of the fields in the header.聽 The following fields should be
filled out, however:

聽 vid_mode:
聽Please see the section on SPECIAL COMMAND LINE OPTIONS.

聽 type_of_loader:
聽I(yíng)f your boot loader has an assigned id (see table below), enter
聽0xTV here, where T is an identifier for the boot loader and V is
聽a version number.聽 Otherwise, enter 0xFF here.

聽Assigned boot loader ids:
聽0聽 LILO
聽1聽 Loadlin
聽2聽 bootsect-loader
聽3聽 SYSLINUX
聽4聽 EtherBoot
聽5聽 ELILO
聽7聽 GRuB
聽8聽 U-BOOT

聽Please contact <hpa@zytor.com> if you need a bootloader ID
聽value assigned.

聽 loadflags, heap_end_ptr:
聽I(yíng)f the protocol version is 2.01 or higher, enter the
聽offset limit of the setup heap into heap_end_ptr and set the
聽0x80 bit (CAN_USE_HEAP) of loadflags.聽 heap_end_ptr appears to
聽be relative to the start of setup (offset 0x0200).

聽 setup_move_size:
聽When using protocol 2.00 or 2.01, if the real mode
聽kernel is not loaded at 0x90000, it gets moved there later in
聽the loading sequence.聽 Fill in this field if you want
聽additional data (such as the kernel command line) moved in
聽addition to the real-mode kernel itself.

聽 ramdisk_image, ramdisk_size:
聽I(yíng)f your boot loader has loaded an initial ramdisk (initrd),
聽set ramdisk_image to the 32-bit pointer to the ramdisk data
聽and the ramdisk_size to the size of the ramdisk data.

聽The initrd should typically be located as high in memory as
聽possible, as it may otherwise get overwritten by the early
聽kernel initialization sequence.聽 However, it must never be
聽located above the address specified in the initrd_addr_max
聽field.聽The initrd should be at least 4K page aligned.

聽 cmd_line_ptr:
聽I(yíng)f the protocol version is 2.02 or higher, this is a 32-bit
聽pointer to the kernel command line.聽 The kernel command line
聽can be located anywhere between the end of setup and 0xA0000.
聽Fill in this field even if your boot loader does not support a
聽command line, in which case you can point this to an empty
聽string (or better yet, to the string "auto".)聽 If this field
聽is left at zero, the kernel will assume that your boot loader
聽does not support the 2.02+ protocol.

聽 ramdisk_max:
聽The maximum address that may be occupied by the initrd
聽contents.聽 For boot protocols 2.02 or earlier, this field is
聽not present, and the maximum address is 0x37FFFFFF.聽 (This
聽address is defined as the address of the highest safe byte, so
聽if your ramdisk is exactly 131072 bytes long and this field is
聽0x37FFFFFF, you can start your ramdisk at 0x37FE0000.)


**** THE KERNEL COMMAND LINE

The kernel command line has become an important way for the boot
loader to communicate with the kernel.聽 Some of its options are also
relevant to the boot loader itself, see "special command line options"
below.

The kernel command line is a null-terminated string currently up to
255 characters long, plus the final null.聽 A string that is too long
will be automatically truncated by the kernel, a boot loader may allow
a longer command line to be passed to permit future kernels to extend
this limit.

If the boot protocol version is 2.02 or later, the address of the
kernel command line is given by the header field cmd_line_ptr (see
above.)聽 This address can be anywhere between the end of the setup
heap and 0xA0000.

If the protocol version is *not* 2.02 or higher, the kernel
command line is entered using the following protocol:

聽At offset 0x0020 (word), "cmd_line_magic", enter the magic
聽number 0xA33F.

聽At offset 0x0022 (word), "cmd_line_offset", enter the offset
聽of the kernel command line (relative to the start of the
聽real-mode kernel).

聽The kernel command line *must* be within the memory region
聽covered by setup_move_size, so you may need to adjust this
聽field.


**** SAMPLE BOOT CONFIGURATION

As a sample configuration, assume the following layout of the real
mode segment (this is a typical, and recommended layout):

聽0x0000-0x7FFF聽Real mode kernel
聽0x8000-0x8FFF聽Stack and heap
聽0x9000-0x90FF聽Kernel command line

Such a boot loader should enter the following fields in the header:

聽unsigned long base_ptr;聽/* base address for real-mode segment */

聽if ( setup_sects == 0 ) {
聽聽setup_sects = 4;
聽}

聽if ( protocol >= 0x0200 ) {
聽聽type_of_loader = <type code>;
聽聽if ( loading_initrd ) {
聽聽聽ramdisk_image = <initrd_address>;
聽聽聽ramdisk_size = <initrd_size>;
聽聽}
聽聽if ( protocol >= 0x0201 ) {
聽聽聽heap_end_ptr = 0x9000 - 0x200;
聽聽聽loadflags |= 0x80; /* CAN_USE_HEAP */
聽聽}
聽聽if ( protocol >= 0x0202 ) {
聽聽聽cmd_line_ptr = base_ptr + 0x9000;
聽聽} else {
聽聽聽cmd_line_magic聽= 0xA33F;
聽聽聽cmd_line_offset = 0x9000;
聽聽聽setup_move_size = 0x9100;
聽聽}
聽} else {
聽聽/* Very old kernel */

聽聽cmd_line_magic聽= 0xA33F;
聽聽cmd_line_offset = 0x9000;

聽聽/* A very old kernel MUST have its real-mode code
聽聽聽聽 loaded at 0x90000 */

聽聽if ( base_ptr != 0x90000 ) {
聽聽聽/* Copy the real-mode kernel */
聽聽聽memcpy(0x90000, base_ptr, (setup_sects+1)*512);
聽聽聽/* Copy the command line */
聽聽聽memcpy(0x99000, base_ptr+0x9000, 256);

聽聽聽base_ptr = 0x90000;聽聽 /* Relocated */
聽聽}

聽聽/* It is recommended to clear memory up to the 32K mark */
聽聽memset(0x90000 + (setup_sects+1)*512, 0,
聽聽聽聽聽聽聽聽 (64-(setup_sects+1))*512);
聽}


**** LOADING THE REST OF THE KERNEL

The 32-bit (non-real-mode) kernel starts at offset (setup_sects+1)*512
in the kernel file (again, if setup_sects == 0 the real value is 4.)
It should be loaded at address 0x10000 for Image/zImage kernels and
0x100000 for bzImage kernels.

The kernel is a bzImage kernel if the protocol >= 2.00 and the 0x01
bit (LOAD_HIGH) in the loadflags field is set:

聽is_bzImage = (protocol >= 0x0200) && (loadflags & 0x01);
聽load_address = is_bzImage ? 0x100000 : 0x10000;

Note that Image/zImage kernels can be up to 512K in size, and thus use
the entire 0x10000-0x90000 range of memory.聽 This means it is pretty
much a requirement for these kernels to load the real-mode part at
0x90000.聽 bzImage kernels allow much more flexibility.


**** SPECIAL COMMAND LINE OPTIONS

If the command line provided by the boot loader is entered by the
user, the user may expect the following command line options to work.
They should normally not be deleted from the kernel command line even
though not all of them are actually meaningful to the kernel.聽 Boot
loader authors who need additional command line options for the boot
loader itself should get them registered in
Documentation/kernel-parameters.txt to make sure they will not
conflict with actual kernel options now or in the future.

聽 vga=<mode>
聽<mode> here is either an integer (in C notation, either
聽decimal, octal, or hexadecimal) or one of the strings
聽"normal" (meaning 0xFFFF), "ext" (meaning 0xFFFE) or "ask"
聽(meaning 0xFFFD).聽 This value should be entered into the
聽vid_mode field, as it is used by the kernel before the command
聽line is parsed.

聽 mem=<size>
聽<size> is an integer in C notation optionally followed by K, M
聽or G (meaning << 10, << 20 or << 30).聽 This specifies the end
聽of memory to the kernel. This affects the possible placement
聽of an initrd, since an initrd should be placed near end of
聽memory.聽 Note that this is an option to *both* the kernel and
聽the bootloader!

聽 initrd=<file>
聽An initrd should be loaded.聽 The meaning of <file> is
聽obviously bootloader-dependent, and some boot loaders
聽(e.g. LILO) do not have such a command.

In addition, some boot loaders add the following options to the
user-specified command line:

聽 BOOT_IMAGE=<file>
聽The boot image which was loaded.聽 Again, the meaning of <file>
聽is obviously bootloader-dependent.

聽 auto
聽The kernel was booted without explicit user intervention.

If these options are added by the boot loader, it is highly
recommended that they are located *first*, before the user-specified
or configuration-specified command line.聽 Otherwise, "init=/bin/sh"
gets confused by the "auto" option.


**** RUNNING THE KERNEL

The kernel is started by jumping to the kernel entry point, which is
located at *segment* offset 0x20 from the start of the real mode
kernel.聽 This means that if you loaded your real-mode kernel code at
0x90000, the kernel entry point is 9020:0000.

At entry, ds = es = ss should point to the start of the real-mode
kernel code (0x9000 if the code is loaded at 0x90000), sp should be
set up properly, normally pointing to the top of the heap, and
interrupts should be disabled.聽 Furthermore, to guard against bugs in
the kernel, it is recommended that the boot loader sets fs = gs = ds =
es = ss.

In our example from above, we would do:

聽/* Note: in the case of the "old" kernel protocol, base_ptr must
聽聽聽 be == 0x90000 at this point; see the previous sample code */

聽seg = base_ptr >> 4;

聽cli();聽/* Enter with interrupts disabled! */

聽/* Set up the real-mode kernel stack */
聽_SS = seg;
聽_SP = 0x9000;聽/* Load SP immediately after loading SS! */

聽_DS = _ES = _FS = _GS = seg;
聽jmp_far(seg+0x20, 0);聽/* Run the kernel */

If your boot sector accesses a floppy drive, it is recommended to
switch off the floppy motor before running the kernel, since the
kernel boot leaves interrupts off and thus the motor will not be
switched off, especially if the loaded kernel has the floppy driver as
a demand-loaded module!


**** ADVANCED BOOT TIME HOOKS

If the boot loader runs in a particularly hostile environment (such as
LOADLIN, which runs under DOS) it may be impossible to follow the
standard memory location requirements.聽 Such a boot loader may use the
following hooks that, if set, are invoked by the kernel at the
appropriate time.聽 The use of these hooks should probably be
considered an absolutely last resort!

IMPORTANT: All the hooks are required to preserve %esp, %ebp, %esi and
%edi across invocation.

聽 realmode_swtch:
聽A 16-bit real mode far subroutine invoked immediately before
聽entering protected mode.聽 The default routine disables NMI, so
聽your routine should probably do so, too.

聽 code32_start:
聽A 32-bit flat-mode routine *jumped* to immediately after the
聽transition to protected mode, but before the kernel is
聽uncompressed.聽 No segments, except CS, are set up; you should
聽set them up to KERNEL_DS (0x18) yourself.

聽After completing your hook, you should jump to the address
聽that was in this field before your boot loader overwrote it.



HuYi 2006-06-20 14:46 鍙戣〃璇勮
]]>
vi甯哥敤鍛戒護(hù)鍥?/title><link>http://www.shnenglu.com/huyi/archive/2006/04/18/5808.html</link><dc:creator>HuYi</dc:creator><author>HuYi</author><pubDate>Tue, 18 Apr 2006 03:20:00 GMT</pubDate><guid>http://www.shnenglu.com/huyi/archive/2006/04/18/5808.html</guid><wfw:comment>http://www.shnenglu.com/huyi/comments/5808.html</wfw:comment><comments>http://www.shnenglu.com/huyi/archive/2006/04/18/5808.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/huyi/comments/commentRss/5808.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/huyi/services/trackbacks/5808.html</trackback:ping><description><![CDATA[ <img height="1252" alt="vi.linuxsir.org000.png.jpg" src="http://www.shnenglu.com/images/cppblog_com/huyi/pic/200604/vi.linuxsir.org000.png.jpg" width="1218" border="0" /> <img src ="http://www.shnenglu.com/huyi/aggbug/5808.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/huyi/" target="_blank">HuYi</a> 2006-04-18 11:20 <a href="http://www.shnenglu.com/huyi/archive/2006/04/18/5808.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Linux涓嬭幏鍙栨枃浠跺彉鏇撮氱煡http://www.shnenglu.com/huyi/archive/2006/04/13/5462.htmlHuYiHuYiThu, 13 Apr 2006 05:35:00 GMThttp://www.shnenglu.com/huyi/archive/2006/04/13/5462.htmlhttp://www.shnenglu.com/huyi/comments/5462.htmlhttp://www.shnenglu.com/huyi/archive/2006/04/13/5462.html#Feedback2http://www.shnenglu.com/huyi/comments/commentRss/5462.htmlhttp://www.shnenglu.com/huyi/services/trackbacks/5462.html
#define聽_GNU_SOURCE聽/*聽needed聽to聽get聽the聽defines聽*/聽
#include聽
/*聽in聽glibc聽2.2聽this聽has聽the聽needed聽
values聽defined聽
*/

#include聽
#include聽
#include聽

staticvolatileint聽event_fd;聽

//聽淇″彿澶勭悊渚嬬▼聽
staticvoid聽handler(int聽sig,聽siginfo_t聽*si,聽void*data)聽
{聽
event_fd聽
=聽si->si_fd;聽
}


int聽main(void)聽
{聽
struct聽sigaction聽act;聽
int聽fd;聽

//聽鐧昏淇″彿澶勭悊渚嬬▼聽
act.sa_sigaction聽=聽handler;聽
sigemptyset(
&act.sa_mask);聽
act.sa_flags聽
=聽SA_SIGINFO;聽
sigaction(SIGRTMIN,聽
&act,聽NULL);聽

//聽闇瑕佷簡(jiǎn)瑙e綋鍓嶇洰褰?."鐨勬儏鍐德?/span>
fd聽=聽open(".",聽O_RDONLY);聽
fcntl(fd,聽F_SETSIG,聽SIGRTMIN);聽
fcntl(fd,聽F_NOTIFY,聽DN_MODIFY
|DN_CREATE|DN_MULTISHOT);聽
/*聽we聽will聽now聽be聽notified聽if聽any聽of聽the聽files聽
in聽"."聽is聽modified聽or聽new聽files聽are聽created聽
*/

while聽(1)聽{聽
//聽鏀跺埌淇″彿鍚庯紝灝變細(xì)鎵ц淇″彿澶勭悊渚嬬▼銆偮?br />//聽鑰屄爌ause()聽涔熷氨緇撴潫浜?jiǎn)銆偮?/span>
pause();聽
printf(
"Got聽event聽on聽fd=%d\n",聽event_fd);聽
}

}


涓婇潰榪欎竴灝忔渚嬬▼錛屽浜庣啛鎮(zhèn)?Linux 緋葷粺緙栫▼鐨勮鑰呮湅鍙嬩滑鏉ヨ錛屾槸寰堝鏄撶悊瑙g殑銆傜▼搴忛鍏堟敞鍐屼竴涓俊鍙峰鐞嗕緥紼嬶紝鐒跺悗閫氱煡 Kernel錛屾垜瑕佽瀵?fd 涓婄殑 DN_MODIFY 鍜?DN_CREATE 鍜?DN_MULTISHOT 浜嬩歡銆傦紙鍏充簬榪欎簺浜嬩歡鐨勮緇嗗畾涔夛紝璇瘋鑰呮湅鍙嬩滑鍙傞槄鏂囧悗鎵鍒楃殑鍙傝冭祫鏂欍傦級(jí) Linux Kernel 鏀跺埌榪欎釜璇鋒眰鍚庯紝鎶婄浉搴旂殑 fd 鐨?inode 緇欏仛涓婅鍙鳳紝鐒跺悗 Linux Kernel 鍜岀敤鎴峰簲鐢ㄧ▼搴忓氨鑷【鑷幓澶勭悊鍚勮嚜鐨勫埆鐨勪簨鎯呭幓浜?jiǎn)銆傜瓑鍒?inode 涓婂彂鐢熶簡(jiǎn)鐩稿簲鐨勪簨浠訛紝Linux Kernel 灝辨妸淇″彿鍙戠粰鐢ㄦ埛榪涚▼錛屼簬鏄紑濮嬫墽琛屼俊鍙峰鐞嗕緥紼嬶紝鐢ㄦ埛紼嬪簭瀵規(guī)枃浠剁郴緇熶笂鐨勫彉鍖栦篃灝卞彲浠ュ強(qiáng)鏃剁殑鍋氬嚭鍙嶅簲浜?jiǎn)銆傝屽湪榪欐暣涓繃紼嬩腑錛岀郴緇熶互鍙?qiáng)鐢ㄦ堬L(fēng)▼搴忕殑姝e父榪愯鍩烘湰涓婃湭鍙楀埌鎬ц兘涓婄殑褰卞搷銆傝繖閲岃繕闇瑕佽鏄庣殑鏄紝dnotify 騫舵病鏈夐氳繃澧炲姞鏂扮殑緋葷粺璋冪敤鏉ュ畬鎴愬畠鐨勫姛鑳斤紝鑰屾槸閫氳繃 fcntl 鏉ュ畬鎴愪換鍔$殑銆傚鍔犱竴涓郴緇熻皟鐢紝鐩稿鏉ヨ鏄竴涓緢澶х殑鎵嬫湳錛岃屼笖濡傛灉璁捐涓嶅綋錛屽鐞嗗緱涓嶅ソ鐨勮瘽錛屼激鐤や細(xì)涓鐩寸暀鍦ㄩ偅閲岋紝榪欐槸 Linux Kernel 鐨勫紑鍙戣呬滑鎵闈炲父涓嶆効鎰忚鍒扮殑浜嬫儏銆?



HuYi 2006-04-13 13:35 鍙戣〃璇勮
]]>
gun甯哥敤宸ュ叿鎵嬪唽闆?chm鐗?http://www.shnenglu.com/huyi/archive/2006/04/12/5392.htmlHuYiHuYiWed, 12 Apr 2006 07:09:00 GMThttp://www.shnenglu.com/huyi/archive/2006/04/12/5392.htmlhttp://www.shnenglu.com/huyi/comments/5392.htmlhttp://www.shnenglu.com/huyi/archive/2006/04/12/5392.html#Feedback4http://www.shnenglu.com/huyi/comments/commentRss/5392.htmlhttp://www.shnenglu.com/huyi/services/trackbacks/5392.html鎴戞妸緇忓父鐢ㄥ埌鐨凣NU宸ュ叿鏂囨。鍋氭垚浜?jiǎn)chm鏂囦歡錛屾彁渚涚粰闇瑕佺殑鏈嬪弸涓嬭澆銆?br />鍖呮嫭濡備笅鎵嬪唽錛?br />聽聽聽聽C library
聽聽聽聽awk
聽聽聽聽autogen
聽聽聽聽automake
聽聽聽聽bash
聽聽聽聽tar
聽聽聽聽gsasl
聽聽聽聽sed

http://www.shnenglu.com/Files/huyi/gnu.part1.rar

http://www.shnenglu.com/Files/huyi/gnu.part2.rar



HuYi 2006-04-12 15:09 鍙戣〃璇勮
]]>
GCC鍙傛暟紲ヨВhttp://www.shnenglu.com/huyi/archive/2006/03/20/4354.htmlHuYiHuYiMon, 20 Mar 2006 02:30:00 GMThttp://www.shnenglu.com/huyi/archive/2006/03/20/4354.htmlhttp://www.shnenglu.com/huyi/comments/4354.htmlhttp://www.shnenglu.com/huyi/archive/2006/03/20/4354.html#Feedback1http://www.shnenglu.com/huyi/comments/commentRss/4354.htmlhttp://www.shnenglu.com/huyi/services/trackbacks/4354.htmlgcc and g++鍒嗗埆鏄痝nu鐨刢 & c++緙栬瘧鍣?gcc/g++鍦ㄦ墽琛岀紪璇戝伐浣滅殑鏃跺欙紝鎬誨叡闇瑕?姝?

1.棰勫鐞?鐢熸垚.i鐨勬枃浠禰棰勫鐞嗗櫒cpp]
2.灝嗛澶勭悊鍚庣殑鏂囦歡涓嶈漿鎹㈡垚姹囩紪璇█,鐢熸垚鏂囦歡.s[緙栬瘧鍣╡gcs]
3.鏈夋眹緙栧彉涓虹洰鏍囦唬鐮?鏈哄櫒浠g爜)鐢熸垚.o鐨勬枃浠禰姹囩紪鍣╝s]
4.榪炴帴鐩爣浠g爜,鐢熸垚鍙墽琛岀▼搴廩閾炬帴鍣╨d]
[鍙傛暟璇﹁В]
-x language filename
銆 璁懼畾鏂囦歡鎵浣跨敤鐨勮璦,浣垮悗緙鍚嶆棤鏁?瀵逛互鍚庣殑澶氫釜鏈夋晥.涔熷氨鏄牴鎹害瀹欳璇█鐨勫悗
緙鍚嶇О鏄?c鐨勶紝鑰孋++鐨勫悗緙鍚嶆槸.C鎴栬?cpp,濡傛灉浣犲緢涓э紝鍐沖畾浣犵殑C浠g爜鏂囦歡鐨勫悗緙
鍚嶆槸.pig 鍝堝搱錛岄偅浣犲氨瑕佺敤榪欎釜鍙傛暟,榪欎釜鍙傛暟瀵逛粬鍚庨潰鐨勬枃浠跺悕閮借搗浣滅敤錛岄櫎闈炲埌浜?
涓嬩竴涓弬鏁扮殑浣跨敤銆?
銆銆鍙互浣跨敤鐨勫弬鏁板悧鏈変笅闈㈢殑榪欎簺
銆銆`c', `objective-c', `c-header', `c++', `cpp-output', `assembler', and `a
ssembler-with-cpp'.
銆銆鐪嬪埌鑻辨枃錛屽簲璇ュ彲浠ョ悊瑙g殑銆?
銆銆渚嬪瓙鐢ㄦ硶:
銆銆gcc -x c hello.pig
銆銆
-x none filename
銆銆鍏蟲帀涓婁竴涓夐」錛屼篃灝辨槸璁ゞcc鏍規(guī)嵁鏂囦歡鍚嶅悗緙錛岃嚜鍔ㄨ瘑鍒枃浠剁被鍨?
銆銆渚嬪瓙鐢ㄦ硶:
銆銆gcc -x c hello.pig -x none hello2.c
銆銆
-c
銆銆鍙縺媧婚澶勭悊,緙栬瘧,鍜屾眹緙?涔熷氨鏄粬鍙妸紼嬪簭鍋氭垚obj鏂囦歡
銆銆渚嬪瓙鐢ㄦ硶:
銆銆gcc -c hello.c
銆銆浠栧皢鐢熸垚.o鐨刼bj鏂囦歡
-S
銆銆鍙縺媧婚澶勭悊鍜岀紪璇戯紝灝辨槸鎸囨妸鏂囦歡緙栬瘧鎴愪負(fù)姹囩紪浠g爜銆?
銆銆渚嬪瓙鐢ㄦ硶
銆銆gcc -S hello.c
銆銆浠栧皢鐢熸垚.s鐨勬眹緙栦唬鐮侊紝浣犲彲浠ョ敤鏂囨湰緙栬緫鍣ㄥ療鐪?
-E
銆銆鍙縺媧婚澶勭悊,榪欎釜涓嶇敓鎴愭枃浠?浣犻渶瑕佹妸瀹冮噸瀹氬悜鍒頒竴涓緭鍑烘枃浠墮噷闈?
銆銆渚嬪瓙鐢ㄦ硶:
銆銆gcc -E hello.c > pianoapan.txt
銆銆gcc -E hello.c | more
銆銆鎱㈡參鐪嬪惂,涓涓猦ello word 涔熻涓庡鐞嗘垚800琛岀殑浠g爜
-o
銆銆鍒跺畾鐩爣鍚嶇О,緙虹渷鐨勬椂鍊?gcc 緙栬瘧鍑烘潵鐨勬枃浠舵槸a.out,寰堥毦鍚?濡傛灉浣犲拰鎴戞湁鍚屾劅
錛屾敼鎺夊畠,鍝堝搱
銆銆渚嬪瓙鐢ㄦ硶
銆銆gcc -o hello.exe hello.c (鍝?windows鐢ㄤ範(fàn)鎯簡(jiǎn))
銆銆gcc -o hello.asm -S hello.c
-pipe
銆銆浣跨敤綆¢亾浠f浛緙栬瘧涓復(fù)鏃舵枃浠?鍦ㄤ嬌鐢ㄩ潪gnu姹囩紪宸ュ叿鐨勬椂鍊?鍙兘鏈変簺闂
銆銆gcc -pipe -o hello.exe hello.c
-ansi
銆銆鍏抽棴gnu c涓笌ansi c涓嶅吋瀹圭殑鐗規(guī)?嬋媧籥nsi c鐨勪笓鏈夌壒鎬?鍖呮嫭紱佹涓浜沘sm inl
ine typeof鍏抽敭瀛?浠ュ強(qiáng)UNIX,vax絳夐澶勭悊瀹?
-fno-asm
銆銆姝ら夐」瀹炵幇ansi閫夐」鐨勫姛鑳界殑涓閮ㄥ垎錛屽畠紱佹灝哸sm,inline鍜宼ypeof鐢ㄤ綔鍏抽敭瀛椼?
銆銆銆銆
-fno-strict-prototype
銆銆鍙g++璧蜂綔鐢?浣跨敤榪欎釜閫夐」,g++灝嗗涓嶅甫鍙傛暟鐨勫嚱鏁?閮借涓烘槸娌℃湁鏄懼紡鐨勫鍙傛暟
鐨勪釜鏁板拰綾誨瀷璇存槑,鑰屼笉鏄病鏈夊弬鏁?
銆銆鑰実cc鏃犺鏄惁浣跨敤榪欎釜鍙傛暟,閮藉皢瀵規(guī)病鏈夊甫鍙傛暟鐨勫嚱鏁?璁や負(fù)鍩庢病鏈夋樉寮忚鏄庣殑綾誨瀷

銆銆
-fthis-is-varialble
銆銆灝辨槸鍚戜紶緇焎++鐪嬮綈,鍙互浣跨敤this褰撲竴鑸彉閲忎嬌鐢?
銆銆
-fcond-mismatch
銆銆鍏佽鏉′歡琛ㄨ揪寮忕殑絎簩鍜岀涓夊弬鏁扮被鍨嬩笉鍖歸厤,琛ㄨ揪寮忕殑鍊煎皢涓簐oid綾誨瀷
銆銆
-funsigned-char
-fno-signed-char
-fsigned-char
-fno-unsigned-char
銆銆榪欏洓涓弬鏁版槸瀵筩har綾誨瀷榪涜璁劇疆,鍐沖畾灝哻har綾誨瀷璁劇疆鎴恥nsigned char(鍓嶄袱涓弬
鏁?鎴栬?signed char(鍚庝袱涓弬鏁?
銆銆
-include file
銆銆鍖呭惈鏌愪釜浠g爜,綆鍗曟潵璇?灝辨槸渚夸互鏌愪釜鏂囦歡,闇瑕佸彟涓涓枃浠剁殑鏃跺?灝卞彲浠ョ敤瀹冭
瀹?鍔熻兘灝辯浉褰撲簬鍦ㄤ唬鐮佷腑浣跨敤#include<filename>
銆銆渚嬪瓙鐢ㄦ硶:
銆銆gcc hello.c -include /root/pianopan.h
銆銆
-imacros file
銆銆灝唂ile鏂囦歡鐨勫畯,鎵╁睍鍒癵cc/g++鐨勮緭鍏ユ枃浠?瀹忓畾涔夋湰韜茍涓嶅嚭鐜板湪杈撳叆鏂囦歡涓?
銆銆
-Dmacro
銆銆鐩稿綋浜嶤璇█涓殑#define macro
銆銆
-Dmacro=defn
銆銆鐩稿綋浜嶤璇█涓殑#define macro=defn
銆銆
-Umacro
銆銆鐩稿綋浜嶤璇█涓殑#undef macro
-undef
銆銆鍙栨秷瀵逛換浣曢潪鏍囧噯瀹忕殑瀹氫箟
銆銆
-Idir
銆銆鍦ㄤ綘鏄敤#include"file"鐨勬椂鍊?gcc/g++浼?xì)鍏堝湪褰撳墠鐩綍鏌ユ壘浣犳墍鍒跺畾鐨勫ご鏂囦歡,濡?
鏋滄病鏈夋壘鍒?浠栧洖鍒扮己鐪佺殑澶存枃浠剁洰褰曟壘,濡傛灉浣跨敤-I鍒跺畾浜?jiǎn)鐩?浠?
銆銆鍥炲厛鍦ㄤ綘鎵鍒跺畾鐨勭洰褰曟煡鎵?鐒跺悗鍐嶆寜甯歌鐨勯『搴忓幓鎵?
銆銆瀵逛簬#include<file>,gcc/g++浼?xì)鍒?I鍒跺畾鐨勭洰褰曟煡鎵?鏌ユ壘涓嶅埌,鐒跺悗灝嗗埌緋葷粺鐨勭己
鐪佺殑澶存枃浠剁洰褰曟煡鎵?
銆銆
-I-
銆銆灝辨槸鍙栨秷鍓嶄竴涓弬鏁扮殑鍔熻兘,鎵浠ヤ竴鑸湪-Idir涔嬪悗浣跨敤
銆銆
-idirafter dir
銆銆鍦?I鐨勭洰褰曢噷闈㈡煡鎵懼け璐?璁插埌榪欎釜鐩綍閲岄潰鏌ユ壘.
銆銆
-iprefix prefix
-iwithprefix dir
銆銆涓鑸竴璧蜂嬌鐢?褰?I鐨勭洰褰曟煡鎵懼け璐?浼?xì)鍒皃refix+dir涓嬫煡鎵?
銆銆
-nostdinc
銆銆浣跨紪璇戝櫒涓嶅啀緋葷粺緙虹渷鐨勫ご鏂囦歡鐩綍閲岄潰鎵懼ご鏂囦歡,涓鑸拰-I鑱斿悎浣跨敤,鏄庣‘闄愬畾澶?
鏂囦歡鐨勪綅緗?
銆銆
-nostdin C++
銆銆瑙勫畾涓嶅湪g++鎸囧畾鐨勬爣鍑嗚礬緇忎腑鎼滅儲(chǔ),浣嗕粛鍦ㄥ叾浠栬礬寰勪腑鎼滅儲(chǔ),.姝ら夐」鍦ㄥ垱libg++搴?
浣跨敤
銆銆
-C
銆銆鍦ㄩ澶勭悊鐨勬椂鍊?涓嶅垹闄ゆ敞閲婁俊鎭?涓鑸拰-E浣跨敤,鏈夋椂鍊欏垎鏋愮▼搴忥紝鐢ㄨ繖涓緢鏂逛究鐨?

銆銆
-M
銆銆鐢熸垚鏂囦歡鍏寵仈鐨勪俊鎭傚寘鍚洰鏍囨枃浠舵墍渚濊禆鐨勬墍鏈夋簮浠g爜浣犲彲浠ョ敤gcc -M hello.c
鏉ユ祴璇曚竴涓嬶紝寰堢畝鍗曘?
銆銆
-MM
銆銆鍜屼笂闈㈢殑閭d釜涓鏍鳳紝浣嗘槸瀹冨皢蹇界暐鐢?include<file>閫犳垚鐨勪緷璧栧叧緋匯?
銆銆
-MD
銆銆鍜?M鐩稿悓錛屼絾鏄緭鍑哄皢瀵煎叆鍒?d鐨勬枃浠墮噷闈?
銆銆
-MMD
銆銆鍜?MM鐩稿悓錛屼絾鏄緭鍑哄皢瀵煎叆鍒?d鐨勬枃浠墮噷闈?
銆銆
-Wa,option
銆銆姝ら夐」浼犻抩ption緇欐眹緙栫▼搴?濡傛灉option涓棿鏈夐楀彿,灝卞皢option鍒嗘垚澶氫釜閫夐」,鐒?
鍚庝紶閫掔粰浼?xì)姹嚲~栫▼搴?
銆銆
-Wl.option
銆銆姝ら夐」浼犻抩ption緇欒繛鎺ョ▼搴?濡傛灉option涓棿鏈夐楀彿,灝卞皢option鍒嗘垚澶氫釜閫夐」,鐒?
鍚庝紶閫掔粰浼?xì)杩炴帴绋嬪?
銆銆
-llibrary
銆銆鍒跺畾緙栬瘧鐨勬椂鍊欎嬌鐢ㄧ殑搴?
銆銆渚嬪瓙鐢ㄦ硶
銆銆gcc -lcurses hello.c
銆銆浣跨敤ncurses搴撶紪璇戠▼搴?
銆銆
-Ldir
銆銆鍒跺畾緙栬瘧鐨勬椂鍊欙紝鎼滅儲(chǔ)搴撶殑璺緞銆傛瘮濡備綘鑷繁鐨勫簱錛屽彲浠ョ敤瀹冨埗瀹氱洰褰曪紝涓嶇劧
銆銆緙栬瘧鍣ㄥ皢鍙湪鏍囧噯搴撶殑鐩綍鎵俱傝繖涓猟ir灝辨槸鐩綍鐨勫悕縐般?
銆銆
-O0
-O1
-O2
-O3
銆銆緙栬瘧鍣ㄧ殑浼樺寲閫夐」鐨?涓駭鍒紝-O0琛ㄧず娌℃湁浼樺寲,-O1涓虹己鐪佸鹼紝-O3浼樺寲綰у埆鏈楂樸
銆 銆銆
-g
銆銆鍙槸緙栬瘧鍣紝鍦ㄧ紪璇戠殑鏃跺欙紝浜х敓璋冭瘯淇℃伅銆?
銆銆
-gstabs
銆銆姝ら夐」浠tabs鏍煎紡澹扮О璋冭瘯淇℃伅,浣嗘槸涓嶅寘鎷琯db璋冭瘯淇℃伅.
銆銆
-gstabs+
銆銆姝ら夐」浠tabs鏍煎紡澹扮О璋冭瘯淇℃伅,騫朵笖鍖呭惈浠呬緵gdb浣跨敤鐨勯澶栬皟璇曚俊鎭?
銆銆
-ggdb
銆銆姝ら夐」灝嗗敖鍙兘鐨勭敓鎴恎db鐨勫彲浠ヤ嬌鐢ㄧ殑璋冭瘯淇℃伅.
-static
銆銆姝ら夐」灝嗙姝嬌鐢ㄥ姩鎬佸簱錛屾墍浠ワ紝緙栬瘧鍑烘潵鐨勪笢瑗匡紝涓鑸兘寰堝ぇ錛屼篃涓嶉渶瑕佷粈涔?
鍔ㄦ佽繛鎺ュ簱錛屽氨鍙互榪愯.
-share
銆銆姝ら夐」灝嗗敖閲忎嬌鐢ㄥ姩鎬佸簱錛屾墍浠ョ敓鎴愭枃浠舵瘮杈冨皬錛屼絾鏄渶瑕佺郴緇熺敱鍔ㄦ佸簱.
-traditional
銆銆璇曞浘璁╃紪璇戝櫒鏀寔浼犵粺鐨凜璇█鐗規(guī)?
[鍙傝冭祫鏂橾
-Linux/UNIX楂樼駭緙栫▼
銆銆涓綰㈡棗杞歡鎶鏈湁闄愬叕鍙哥紪钁?娓呭崕澶у鍑虹増紺懼嚭鐗?
-Gcc man page
銆銆
[ChangeLog]
-2002-08-10
銆銆ver 0.1 鍙戝竷鏈鍒濈殑鏂囨。
-2002-08-11
銆銆ver 0.11 淇敼鏂囨。鏍煎紡
-2002-08-12
銆銆ver 0.12 鍔犲叆浜?jiǎn)瀵归潤(rùn)鎬佸簱錛屽姩鎬佸簱鐨勫弬鏁?
-2002-08-16
銆銆ver 0.16 澧炲姞浜?jiǎn)gcc緙栬瘧鐨?涓樁孌電殑鍛戒護(hù)
榪愯 gcc/egcs
**********榪愯 gcc/egcs***********************
銆銆GCC 鏄?GNU 鐨?C 鍜?C++ 緙栬瘧鍣ㄣ傚疄闄呬笂錛孏CC 鑳藉緙栬瘧涓夌璇█錛欳銆丆++ 鍜?O
bject C錛圕 璇█鐨勪竴縐嶉潰鍚戝璞℃墿灞曪級(jí)銆傚埄鐢?gcc 鍛戒護(hù)鍙悓鏃剁紪璇戝茍榪炴帴 C 鍜?C++
婧愮▼搴忋?
銆銆濡傛灉浣犳湁涓や釜鎴栧皯鏁板嚑涓?C 婧愭枃浠訛紝涔熷彲浠ユ柟渚垮湴鍒╃敤 GCC 緙栬瘧銆佽繛鎺ュ茍鐢熸垚鍙?
鎵ц鏂囦歡銆備緥濡傦紝鍋囪浣犳湁涓や釜婧愭枃浠?main.c 鍜?factorial.c 涓や釜婧愭枃浠訛紝鐜板湪瑕佺紪
璇戠敓鎴愪竴涓綆楅樁涔樼殑紼嬪簭銆?
浠g爜:
-----------------------
娓呭崟 factorial.c
-----------------------
int factorial (int n)
{
銆銆if (n <= 1)
銆銆銆return 1;
銆銆else
銆銆銆return factorial (n - 1) * n;
}
-----------------------
娓呭崟 main.c
-----------------------
#include銆<stdio.h>
#include銆<unistd.h>
int factorial (int n);
int main (int argc, char **argv)
{
銆銆int n;
銆銆if (argc < 2)
銆銆{
銆銆銆銆printf ("Usage: %s n\n", argv [0]);
銆銆銆銆return -1;
銆銆}
銆銆else
銆銆{
銆銆銆n = atoi (argv[1]);
銆銆銆printf ("Factorial of %d is %d.\n", n, factorial (n));
銆銆 }
銆銆return 0;
}
-----------------------
鍒╃敤濡備笅鐨勫懡浠ゅ彲緙栬瘧鐢熸垚鍙墽琛屾枃浠訛紝騫舵墽琛岀▼搴忥細(xì)
$ gcc -o factorial main.c factorial.c
$ ./factorial 5
Factorial of 5 is 120.
銆銆GCC 鍙悓鏃剁敤鏉ョ紪璇?C 紼嬪簭鍜?C++ 紼嬪簭銆備竴鑸潵璇達(dá)紝C 緙栬瘧鍣ㄩ氳繃婧愭枃浠剁殑鍚庣紑
鍚嶆潵鍒ゆ柇鏄?C 紼嬪簭榪樻槸 C++ 紼嬪簭銆傚湪 Linux 涓紝C 婧愭枃浠剁殑鍚庣紑鍚嶄負(fù) .c錛岃?C++ 婧?
鏂囦歡鐨勫悗緙鍚嶄負(fù) .C 鎴?.cpp銆備絾鏄紝gcc 鍛戒護(hù)鍙兘緙栬瘧 C++ 婧愭枃浠訛紝鑰屼笉鑳借嚜鍔ㄥ拰 C
++ 紼嬪簭浣跨敤鐨勫簱榪炴帴銆傚洜姝わ紝閫氬父浣跨敤 g++ 鍛戒護(hù)鏉ュ畬鎴?C++ 紼嬪簭鐨勭紪璇戝拰榪炴帴錛岃紼?
搴忎細(xì)鑷姩璋冪敤 gcc 瀹炵幇緙栬瘧銆傚亣璁炬垜浠湁涓涓涓嬬殑 C++ 婧愭枃浠訛紙hello.C錛夛細(xì)
#include <iostream>
void main (void)
{
銆銆cout << "Hello, world!" << endl;
}
鍒欏彲浠ュ涓嬭皟鐢?g++ 鍛戒護(hù)緙栬瘧銆佽繛鎺ュ茍鐢熸垚鍙墽琛屾枃浠訛細(xì)
$ g++ -o hello hello.C
$ ./hello
Hello, world!
**********************gcc/egcs 鐨勪富瑕侀夐」*********
gcc 鍛戒護(hù)鐨勫父鐢ㄩ夐」
閫夐」 瑙i噴
-ansi 鍙敮鎸?ANSI 鏍囧噯鐨?C 璇硶銆傝繖涓閫夐」灝嗙姝?GNU C 鐨勬煇浜涚壒鑹詫紝
渚嬪 asm 鎴?typeof 鍏抽敭璇嶃?
-c 鍙紪璇戝茍鐢熸垚鐩爣鏂囦歡銆?
-DMACRO 浠ュ瓧絎︿覆鈥?鈥濆畾涔?MACRO 瀹忋?
-DMACRO=DEFN 浠ュ瓧絎︿覆鈥淒EFN鈥濆畾涔?MACRO 瀹忋?
-E 鍙繍琛?C 棰勭紪璇戝櫒銆?
-g 鐢熸垚璋冭瘯淇℃伅銆侴NU 璋冭瘯鍣ㄥ彲鍒╃敤璇ヤ俊鎭?
-IDIRECTORY 鎸囧畾棰濆鐨勫ご鏂囦歡鎼滅儲(chǔ)璺緞DIRECTORY銆?
-LDIRECTORY 鎸囧畾棰濆鐨勫嚱鏁板簱鎼滅儲(chǔ)璺緞DIRECTORY銆?
-lLIBRARY 榪炴帴鏃舵悳绱㈡寚瀹氱殑鍑芥暟搴揕IBRARY銆?
-m486 閽堝 486 榪涜浠g爜浼樺寲銆?
-o FILE 鐢熸垚鎸囧畾鐨勮緭鍑烘枃浠躲傜敤鍦ㄧ敓鎴愬彲鎵ц鏂囦歡鏃躲?
-O0 涓嶈繘琛屼紭鍖栧鐞嗐?
-O 鎴?-O1 浼樺寲鐢熸垚浠g爜銆?
-O2 榪涗竴姝ヤ紭鍖栥?
-O3 姣?-O2 鏇磋繘涓姝ヤ紭鍖栵紝鍖呮嫭 inline 鍑芥暟銆?
-shared 鐢熸垚鍏變韓鐩爣鏂囦歡銆傞氬父鐢ㄥ湪寤虹珛鍏變韓搴撴椂銆?
-static 紱佹浣跨敤鍏變韓榪炴帴銆?
-UMACRO 鍙栨秷瀵?MACRO 瀹忕殑瀹氫箟銆?
-w 涓嶇敓鎴愪換浣曡鍛婁俊鎭?
-Wall 鐢熸垚鎵鏈夎鍛婁俊鎭?img src ="http://www.shnenglu.com/huyi/aggbug/4354.html" width = "1" height = "1" />

HuYi 2006-03-20 10:30 鍙戣〃璇勮
]]>
C++瀵瑰茍琛岃繍綆楃殑鏀寔http://www.shnenglu.com/huyi/archive/2006/03/13/4089.htmlHuYiHuYiMon, 13 Mar 2006 07:22:00 GMThttp://www.shnenglu.com/huyi/archive/2006/03/13/4089.htmlhttp://www.shnenglu.com/huyi/comments/4089.htmlhttp://www.shnenglu.com/huyi/archive/2006/03/13/4089.html#Feedback0http://www.shnenglu.com/huyi/comments/commentRss/4089.htmlhttp://www.shnenglu.com/huyi/services/trackbacks/4089.htmlMPICH錛氭敮鎸佸ぇ瑙勬ā錛屽鏉傜殑闆嗙兢緙栫▼錛屽己鍔涙敮鎸丼PMD妯″瀷錛屼篃鏀寔SMP錛孧PP鍜屽鐢ㄦ埛閰嶇疆銆?BR>PVM錛?nbsp;   鏀寔寮傛瀯鐜闆嗙兢緙栫▼錛屽緢瀹規(guī)槗鐢ㄤ簬鍗曠敤鎴鳳紝涓皬瑙勬ā鐨勯泦緹ゅ簲鐢ㄧ▼搴忥紝鏀寔MPP銆?BR>MICO錛?nbsp; 鏀寔鍒嗗竷寮忓拰闈㈠悜瀵硅薄鐨勫茍琛岀紪紼嬶紝鍖呮嫭瀵筧gent鍜屽agent緙栫▼鐨勮壇濂芥敮鎸併?BR>POSIX錛?鏀寔鍑芥暟鎴栧璞$駭鍗曚釜搴旂敤紼嬪簭鍐呯殑騫惰澶勭悊錛屽彲浠ョ敤鏉ュ埄鐢⊿MP錛孧PP鐨勪紭鍔褲?/P>

HuYi 2006-03-13 15:22 鍙戣〃璇勮
]]>
[灝忕煡璇哴淇″彿閲忓拰鑷棆閿?/title><link>http://www.shnenglu.com/huyi/archive/2006/03/09/3937.html</link><dc:creator>HuYi</dc:creator><author>HuYi</author><pubDate>Thu, 09 Mar 2006 08:02:00 GMT</pubDate><guid>http://www.shnenglu.com/huyi/archive/2006/03/09/3937.html</guid><wfw:comment>http://www.shnenglu.com/huyi/comments/3937.html</wfw:comment><comments>http://www.shnenglu.com/huyi/archive/2006/03/09/3937.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/huyi/comments/commentRss/3937.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/huyi/services/trackbacks/3937.html</trackback:ping><description><![CDATA[<P>淇″彿閲忥細(xì)<BR>綆鍗曠偣璇達(dá)紝灝辨槸<BR>      1 涓涓暣鏁板彉閲廼銆?BR>      2 涓涓瓑寰呰繘紼嬮摼琛ㄣ?BR>      3 涓瀵筆/V鎿嶄綔鍑芥暟銆?BR>P灝唅鍑?錛屽鏋渋<0浜?jiǎn)锛尀鎶婂綋鍓嶆鍦q愯鐨勮繘紼嬪姞鍏ュ埌榪涚▼閾捐〃涓紝騫墮樆濉炰箣銆?BR>V灝唅鍔?錛屽鏋渋>=0,鍒欐縺媧婚摼琛ㄤ腑鐨?涓垨鑰呭涓繘紼嬨?BR>鍚屾椂閫傜敤浜庡崟澶勭悊鍣ㄥ拰澶氬鐞嗗櫒<BR><BR>鑷棆閿侊細(xì)<BR>鍦ㄥ澶勭悊鍣ㄤ腑錛屽鏋滀慨鏀逛竴浜涘唴鏍哥粨鏋勬墍闇瑕佺殑鏃墮棿闈炲父鐭紙鐭簬鎶婅繘紼嬫彃鍏ヨ繘紼嬮摼琛ㄤ腑騫舵寕璧峰畠鎵闇瑕佺殑鏃墮棿錛夛紝鍒欏簲璇ヤ嬌鐢ㄨ嚜鏃嬮攣銆?/P> <P> </P><img src ="http://www.shnenglu.com/huyi/aggbug/3937.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/huyi/" target="_blank">HuYi</a> 2006-03-09 16:02 <a href="http://www.shnenglu.com/huyi/archive/2006/03/09/3937.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[灝忕煡璇哴瀛樺偍鍣ㄧ鐞嗗尯http://www.shnenglu.com/huyi/archive/2006/03/07/3842.htmlHuYiHuYiTue, 07 Mar 2006 09:11:00 GMThttp://www.shnenglu.com/huyi/archive/2006/03/07/3842.htmlhttp://www.shnenglu.com/huyi/comments/3842.htmlhttp://www.shnenglu.com/huyi/archive/2006/03/07/3842.html#Feedback0http://www.shnenglu.com/huyi/comments/commentRss/3842.htmlhttp://www.shnenglu.com/huyi/services/trackbacks/3842.html1銆侷SA鎬葷嚎鐩存帴瀛樺偍鍣ㄥ瓨鍙栵紙DMA錛夊彧鑳藉RAM鐨勫墠16MB瀵誨潃銆?BR>2銆傚湪澶AM鐨?2浣嶆満涓紝鐢變簬綰挎у湴鍧絀洪棿澶皬鐨勫師鍥狅紝CPU涓嶈兘鐩存帴璁塊棶鎵鏈夌墿鐞嗗瓨鍌ㄥ櫒銆?BR>
鎵浠ワ紝Linux鎶婄墿鐞嗗瓨鍌ㄥ櫒鍒嗕負(fù)涓変釜綆$悊鍖猴細(xì)
ZONE_DMA <= 16MB
16MB < ZONE_NORMAL < 896MB
ZONE_HIGHMEM > 896MB

鍦?4浣嶆満涓病鏈変嬌鐢╖ONE_HIGHNEN

HuYi 2006-03-07 17:11 鍙戣〃璇勮
]]>
久久成人国产精品| 国产精品永久久久久久久久久 | 久久精品国产亚洲av麻豆色欲| 日本高清无卡码一区二区久久| 国产精品久久久久a影院| 伊人久久成人成综合网222| 性高湖久久久久久久久| 国内精品久久久久久不卡影院| 亚洲伊人久久大香线蕉综合图片| 久久精品国产亚洲麻豆| 成人a毛片久久免费播放| 亚洲va久久久噜噜噜久久狠狠| 欧美久久一区二区三区| 亚洲伊人久久大香线蕉综合图片 | 久久涩综合| 99久久国产精品免费一区二区| 国产精品成人99久久久久91gav| 亚洲AV无码久久精品蜜桃| 9191精品国产免费久久 | 亚洲国产精品久久久久婷婷老年| 日本五月天婷久久网站| 潮喷大喷水系列无码久久精品| 久久丫忘忧草产品| 久久久精品一区二区三区| 午夜不卡久久精品无码免费| 一本一本久久a久久精品综合麻豆| 国产999精品久久久久久| 亚洲乱码中文字幕久久孕妇黑人| 久久中文字幕精品| 99久久精品费精品国产 | 亚洲欧美成人久久综合中文网 | 久久久久国产精品麻豆AR影院| 久久香蕉国产线看观看99| 久久久久久久97| 久久婷婷国产剧情内射白浆| 人妻无码久久精品| 久久久久久毛片免费看| 久久亚洲色一区二区三区| 久久久久久青草大香综合精品| 老男人久久青草av高清| 久久婷婷人人澡人人爽人人爱|