Data is embedded in gas. incbin

Source: Internet
Author: User

. Incbin"File" [, skip [, Count]
The incbin directive provided des file verbatim at the current location. you can control the search paths used with the '-I' command-line option. quotation marks are required around file. the Skip argument skips a number of bytes from the start of the file. the Count argument indicates the maximum number of bytes to read. note thatData is not aligned in any way, So it is the user's responsibility to make sure that proper alignment is provided both before and after the incbin directive.

View piggy. s under ARCH/Unicore/boot/compressed:

. Section. piggydata, # alloc
. Globl input_data
Input_data:

. Incbin "arch/Unicore/boot/compressed/piggy.gz"

. Globl input_data_end
Input_data_end:

Here we will use the assembler indicator to embed the piggy.gz compressed by imageinto piggy. S. Note that two additional global symbols are declared: input_data input_data_end.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.