| поискавой системы для электроныых деталей |
|
UM0144 датащи(PDF) 45 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0144 датащи(HTML) 45 Page - STMicroelectronics |
|
45 / 92 page ![]() ST7 Assembler Linker 6 Librarian UM0144 45/92 6 Librarian 6.1 Overview If you do a lot of work on similar boards especially those with the same processor, it makes a great deal of sense to reuse lumps of code you've already written to do the same task in a different program. At the simplest level, you could just copy the source code as a block of text into the new program. This works fine, but has a subtle disadvantage: if you update the subroutine, you have to hunt around all the usages of it, performing the update on each. To get around this problem, many people have the source for common routines in one place, and link the .OBJ module with each program needing routine. Then you only need to update the source code once, reassemble it to get a new .OBJ file, then link again all the users of the routine, who will now have the new .OBJ file. While this scheme works well, it generates some problems of its own. For example, each routine needs its own .OBJ file. By nature, these common routines tend to be small, so you end up giving dozens of extra .OBJ modules to the linker, and having the .OBJ modules scattered around your hard disk. The base concept of a librarian is to combine all these small, useful .OBJ modules into one large .LIB library file. You could then tell the linker about the library, and it would take care of sorting out which .OBJ modules to pull into link. It would know which ones to pull by the fact that the main code being linked would have undefined externals, for example, to call the missing library routines. The librarian simply takes each undefined external in turn, and checks it against all the modules in the library. If any of the modules declares a PUBLIC of the same name, it knows you need that .OBJ module and it includes it automatically. 6.2 Invoking the librarian The librarian is called LIB, and takes one command line argument that is the name of the library to operate on. If not given, you'll be prompted for it. LIB [library name] .LIB is added if the suffix is left off. If the library you indicate doesn't exist, LIB asks you if it's a new library. For example: LIB LIB1 STMicroelectronics - Librarian - rel 1.00 Couldn't open Library file 'LIB1.LIB' is it a new file? (y/n): y If the answer is 'n', LIB aborts. If the library exists, LIB prints up a report on the library. Library LIB1.LIB is 2K long. 16/1024 Public labels used in 2/128 modules. Next you're faced with the main prompt: LIB1.LIB: Operation (<ENTER> for help): |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |