SlideShare a Scribd company logo
Elf文件解析
目标文件格式
Elf文件头
大端小端

Inter




               摩托罗拉
节头结构
字符串表
符号表项
重定位项结构
1. Upload Sky shell with 'exec' command and symbols (requires
several recompilations to generate correct symbols):
> make sky-shell-exec.sky                             编译内核

> make sky-shell-exec.sky CORE=sky-shell-exec.sky     生成symbols

> make sky-shell-exec.upload CORE=sky-shell-exec.sky 再次编译内核

如果直接执行第二条命令,可以生成sky-shell-exec.sky ,
symbols为空,
Symbols怎么生成
• Makefile.msp430中
ifdef CORE
symbols.c:
#        @${CONTIKI}/tools/msp430-make-symbols $(CORE)
         $(NM) $(CORE) | awk -f $(CONTIKI)/tools/mknmlist > symbols.c
else
symbols.c symbols.h:
         @${CONTIKI}/tools/make-empty-symbols
Endif
命令
• Msp430-nm - list symbols from object files
• awk [options] -f scriptfile var=value file(s)
awk是一种编程语言,用于在linux/unix下对文本和数据进
行处理。数据可以来自标准输入、一个或多个文件,或其
它命令的输出。它支持用户自定义函数和动态正则表达式
等先进功能,是linux/unix下的一个强大编程工具。它在命
令行中使用,但更多是作为脚本来使用。awk的处理文本
和数据的方式是这样的,它逐行扫描文件,从第一行到最
后一行,寻找匹配的特定模式的行,并在这些行上进行你
想要的操作。如果没有指定处理动作,则把匹配的行显示
到标准输出(屏幕),如果没有指定模式,则所有被操作所
指定的行都被处理。
mknmlist                                                      /^[0123456789abcdef]+ [ABCDGRSTUVW] / {
                                                                if ($3 != "symbols" && $3 != "symbols_nelts") {
                                                                  name[nname] = $3;
                                                                  nname++;
function sort(V, N,                      tmp, i, j) {
                                                                }
  V[-1] = ""; # Used as a sentinel before V[0].
                                                              }
  for (i = 1; i < N; i++)
   for (j = i; V[j - 1] > V[j]; j--) {
                                                              END {
     tmp = V[j];
                                                               sort(name, nname);
     V[j] = V[j - 1];
     V[j - 1] = tmp;
   }                                                              print "#include "loader/symbols.h"n";
  return;
}                                                                 # Must deal with compiler builtins etc.
                                                                  for (x = 0; x < nname; x++) {
BEGIN {                                                             if (builtin[name[x]] != "")
 nname = 0;                                                           print builtin[name[x]] ";";
 builtin["printf"] =       "int printf(const char *, ...)";         else
 builtin["sprintf"] =      "int sprintf(char *, const                 print "extern int " name[x]"();";
char *, ...)";                                                    }
 builtin["malloc"] =       "void *malloc()";                      print "n";
 builtin["calloc"] =       "void *calloc()";
 builtin["memcpy"] =       "void *memcpy()";                      # nname++: An { 0, 0 } entry is added at the end of the vector.
 builtin["memset"] =       "void *memset()";                      print "const int symbols_nelts = " nname+1 ";";
 builtin["memmove"] =      "void *memmove()";                     print "const struct symbols symbols[" nname+1 "] = {";
 builtin["strcpy"] =       "char *strcpy()";                      for (x = 0; x < nname; x++)
 builtin["strchr"] =       "char *strchr()";                       print "{ "" name[x] "", (void *)&"name[x]" },";
 builtin[""] =             "";                                    print "{ (const char *)0, (void *)0} };";
}                                                             }

More Related Content

What's hot

Mouse programming in c
Mouse programming in cMouse programming in c
Mouse programming in c
gkgaur1987
 
Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3
Dr. Loganathan R
 
Oopsprc1c
Oopsprc1cOopsprc1c
Oopsprc1c
Ankit Dubey
 
New presentation oop
New presentation oopNew presentation oop
New presentation oop
Ch shampi Ch shampi
 
Linked list int_data_fdata
Linked list int_data_fdataLinked list int_data_fdata
Linked list int_data_fdata
Samsil Arefin
 
C Sharp Lecture Johan Franzen
C Sharp Lecture  Johan FranzenC Sharp Lecture  Johan Franzen
C Sharp Lecture Johan Franzen
g_hemanth17
 
C++ programs
C++ programsC++ programs
C++ programs
Mukund Gandrakota
 
Linked list imp of list
Linked list imp of listLinked list imp of list
Linked list imp of list
Elavarasi K
 
Desymfony2013.gonzalo123
Desymfony2013.gonzalo123Desymfony2013.gonzalo123
Desymfony2013.gonzalo123
Gonzalo Ayuso
 
basic programs in C++
basic programs in C++ basic programs in C++
basic programs in C++
Arun Nair
 
Bcsl 033 data and file structures lab s2-2
Bcsl 033 data and file structures lab s2-2Bcsl 033 data and file structures lab s2-2
Bcsl 033 data and file structures lab s2-2
Dr. Loganathan R
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
pratikbakane
 
week-17x
week-17xweek-17x
cosc 281 hw2
cosc 281 hw2cosc 281 hw2
cosc 281 hw2
Brian Goggins
 
oop Lecture 4
oop Lecture 4oop Lecture 4
oop Lecture 4
Anwar Ul Haq
 
String Manipulation Function and Header File Functions
String Manipulation Function and Header File FunctionsString Manipulation Function and Header File Functions
Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-3Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-3
Dr. Loganathan R
 
Understanding storage class using nm
Understanding storage class using nmUnderstanding storage class using nm
Understanding storage class using nm
mohamed sikander
 
Stack array
Stack arrayStack array
Stack array
rimshailyas1
 
Bcsl 033 data and file structures lab s4-2
Bcsl 033 data and file structures lab s4-2Bcsl 033 data and file structures lab s4-2
Bcsl 033 data and file structures lab s4-2
Dr. Loganathan R
 

What's hot (20)

Mouse programming in c
Mouse programming in cMouse programming in c
Mouse programming in c
 
Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3
 
Oopsprc1c
Oopsprc1cOopsprc1c
Oopsprc1c
 
New presentation oop
New presentation oopNew presentation oop
New presentation oop
 
Linked list int_data_fdata
Linked list int_data_fdataLinked list int_data_fdata
Linked list int_data_fdata
 
C Sharp Lecture Johan Franzen
C Sharp Lecture  Johan FranzenC Sharp Lecture  Johan Franzen
C Sharp Lecture Johan Franzen
 
C++ programs
C++ programsC++ programs
C++ programs
 
Linked list imp of list
Linked list imp of listLinked list imp of list
Linked list imp of list
 
Desymfony2013.gonzalo123
Desymfony2013.gonzalo123Desymfony2013.gonzalo123
Desymfony2013.gonzalo123
 
basic programs in C++
basic programs in C++ basic programs in C++
basic programs in C++
 
Bcsl 033 data and file structures lab s2-2
Bcsl 033 data and file structures lab s2-2Bcsl 033 data and file structures lab s2-2
Bcsl 033 data and file structures lab s2-2
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
week-17x
week-17xweek-17x
week-17x
 
cosc 281 hw2
cosc 281 hw2cosc 281 hw2
cosc 281 hw2
 
oop Lecture 4
oop Lecture 4oop Lecture 4
oop Lecture 4
 
String Manipulation Function and Header File Functions
String Manipulation Function and Header File FunctionsString Manipulation Function and Header File Functions
String Manipulation Function and Header File Functions
 
Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-3Bcsl 033 data and file structures lab s3-3
Bcsl 033 data and file structures lab s3-3
 
Understanding storage class using nm
Understanding storage class using nmUnderstanding storage class using nm
Understanding storage class using nm
 
Stack array
Stack arrayStack array
Stack array
 
Bcsl 033 data and file structures lab s4-2
Bcsl 033 data and file structures lab s4-2Bcsl 033 data and file structures lab s4-2
Bcsl 033 data and file structures lab s4-2
 

Viewers also liked

Explaining my Phd Thesis to layman
Explaining my Phd Thesis to laymanExplaining my Phd Thesis to layman
Explaining my Phd Thesis to layman
Dharmalingam Ganesan
 
Ivv workshop model-based-testing-of-nasa-systems
Ivv workshop model-based-testing-of-nasa-systemsIvv workshop model-based-testing-of-nasa-systems
Ivv workshop model-based-testing-of-nasa-systems
Dharmalingam Ganesan
 
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in IndustryAssessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
Dharmalingam Ganesan
 
Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2
Dharmalingam Ganesan
 
Reverse Architecting of a Medical Device Software
Reverse Architecting of a Medical Device SoftwareReverse Architecting of a Medical Device Software
Reverse Architecting of a Medical Device Software
Dharmalingam Ganesan
 
Interface-Implementation Contract Checking
Interface-Implementation Contract CheckingInterface-Implementation Contract Checking
Interface-Implementation Contract Checking
Dharmalingam Ganesan
 
Verifying Architectural Design Rules of a Flight Software Product Line
Verifying Architectural Design Rules of a Flight Software Product LineVerifying Architectural Design Rules of a Flight Software Product Line
Verifying Architectural Design Rules of a Flight Software Product Line
Dharmalingam Ganesan
 
Exploiting Cryptographic Misuse - An Example
Exploiting Cryptographic Misuse - An ExampleExploiting Cryptographic Misuse - An Example
Exploiting Cryptographic Misuse - An Example
Dharmalingam Ganesan
 
Reverse Engineering of Software Architecture
Reverse Engineering of Software ArchitectureReverse Engineering of Software Architecture
Reverse Engineering of Software Architecture
Dharmalingam Ganesan
 
Load-time Hacking using LD_PRELOAD
Load-time Hacking using LD_PRELOADLoad-time Hacking using LD_PRELOAD
Load-time Hacking using LD_PRELOAD
Dharmalingam Ganesan
 
Secure application programming in the presence of side channel attacks
Secure application programming in the presence of side channel attacksSecure application programming in the presence of side channel attacks
Secure application programming in the presence of side channel attacks
Dharmalingam Ganesan
 
Model-based Testing of a Software Bus - Applied on Core Flight Executive
Model-based Testing of a Software Bus - Applied on Core Flight ExecutiveModel-based Testing of a Software Bus - Applied on Core Flight Executive
Model-based Testing of a Software Bus - Applied on Core Flight Executive
Dharmalingam Ganesan
 
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case StudyModel-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Dharmalingam Ganesan
 
LD_PRELOAD Exploitation - DC9723
LD_PRELOAD Exploitation - DC9723LD_PRELOAD Exploitation - DC9723
LD_PRELOAD Exploitation - DC9723
Iftach Ian Amit
 
Linux binary analysis and exploitation
Linux binary analysis and exploitationLinux binary analysis and exploitation
Linux binary analysis and exploitation
Dharmalingam Ganesan
 
Stack Frame Protection
Stack Frame ProtectionStack Frame Protection
Stack Frame Protection
Conferencias FIST
 
from Source to Binary: How GNU Toolchain Works
from Source to Binary: How GNU Toolchain Worksfrom Source to Binary: How GNU Toolchain Works
from Source to Binary: How GNU Toolchain Works
National Cheng Kung University
 
GNU ld的linker script簡介
GNU ld的linker script簡介GNU ld的linker script簡介
GNU ld的linker script簡介
Wen Liao
 

Viewers also liked (18)

Explaining my Phd Thesis to layman
Explaining my Phd Thesis to laymanExplaining my Phd Thesis to layman
Explaining my Phd Thesis to layman
 
Ivv workshop model-based-testing-of-nasa-systems
Ivv workshop model-based-testing-of-nasa-systemsIvv workshop model-based-testing-of-nasa-systems
Ivv workshop model-based-testing-of-nasa-systems
 
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in IndustryAssessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
 
Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2
 
Reverse Architecting of a Medical Device Software
Reverse Architecting of a Medical Device SoftwareReverse Architecting of a Medical Device Software
Reverse Architecting of a Medical Device Software
 
Interface-Implementation Contract Checking
Interface-Implementation Contract CheckingInterface-Implementation Contract Checking
Interface-Implementation Contract Checking
 
Verifying Architectural Design Rules of a Flight Software Product Line
Verifying Architectural Design Rules of a Flight Software Product LineVerifying Architectural Design Rules of a Flight Software Product Line
Verifying Architectural Design Rules of a Flight Software Product Line
 
Exploiting Cryptographic Misuse - An Example
Exploiting Cryptographic Misuse - An ExampleExploiting Cryptographic Misuse - An Example
Exploiting Cryptographic Misuse - An Example
 
Reverse Engineering of Software Architecture
Reverse Engineering of Software ArchitectureReverse Engineering of Software Architecture
Reverse Engineering of Software Architecture
 
Load-time Hacking using LD_PRELOAD
Load-time Hacking using LD_PRELOADLoad-time Hacking using LD_PRELOAD
Load-time Hacking using LD_PRELOAD
 
Secure application programming in the presence of side channel attacks
Secure application programming in the presence of side channel attacksSecure application programming in the presence of side channel attacks
Secure application programming in the presence of side channel attacks
 
Model-based Testing of a Software Bus - Applied on Core Flight Executive
Model-based Testing of a Software Bus - Applied on Core Flight ExecutiveModel-based Testing of a Software Bus - Applied on Core Flight Executive
Model-based Testing of a Software Bus - Applied on Core Flight Executive
 
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case StudyModel-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
 
LD_PRELOAD Exploitation - DC9723
LD_PRELOAD Exploitation - DC9723LD_PRELOAD Exploitation - DC9723
LD_PRELOAD Exploitation - DC9723
 
Linux binary analysis and exploitation
Linux binary analysis and exploitationLinux binary analysis and exploitation
Linux binary analysis and exploitation
 
Stack Frame Protection
Stack Frame ProtectionStack Frame Protection
Stack Frame Protection
 
from Source to Binary: How GNU Toolchain Works
from Source to Binary: How GNU Toolchain Worksfrom Source to Binary: How GNU Toolchain Works
from Source to Binary: How GNU Toolchain Works
 
GNU ld的linker script簡介
GNU ld的linker script簡介GNU ld的linker script簡介
GNU ld的linker script簡介
 

Similar to Elf文件解析

selection_sort..c#include stdio.hheader file input output func.pdf
selection_sort..c#include stdio.hheader file input output func.pdfselection_sort..c#include stdio.hheader file input output func.pdf
selection_sort..c#include stdio.hheader file input output func.pdf
anton291
 
VTU Data Structures Lab Manual
VTU Data Structures Lab ManualVTU Data Structures Lab Manual
VTU Data Structures Lab Manual
Nithin Kumar,VVCE, Mysuru
 
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
rushabhshah600
 
III MCS python lab (1).pdf
III MCS python lab (1).pdfIII MCS python lab (1).pdf
III MCS python lab (1).pdf
srxerox
 
C lab manaual
C lab manaualC lab manaual
C lab manaual
manoj11manu
 
Basic C Programming Lab Practice
Basic C Programming Lab PracticeBasic C Programming Lab Practice
Basic C Programming Lab Practice
Mahmud Hasan Tanvir
 
Academy PRO: ES2015
Academy PRO: ES2015Academy PRO: ES2015
Academy PRO: ES2015
Binary Studio
 
Hangman Game Programming in C (coding)
Hangman Game Programming in C (coding)Hangman Game Programming in C (coding)
Hangman Game Programming in C (coding)
hasan0812
 
Struct examples
Struct examplesStruct examples
Struct examples
mondalakash2012
 
SWP - A Generic Language Parser
SWP - A Generic Language ParserSWP - A Generic Language Parser
SWP - A Generic Language Parser
kamaelian
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 058 solved assignment
Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.
Workhorse Computing
 
RIDA PROJECT
RIDA PROJECTRIDA PROJECT
RIDA PROJECT
Rida Bilgrami
 
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets
kinan keshkeh
 
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets
kinan keshkeh
 
#include stdio.h#include stdlib.h#include string.h#inclu.pdf
#include stdio.h#include stdlib.h#include string.h#inclu.pdf#include stdio.h#include stdlib.h#include string.h#inclu.pdf
#include stdio.h#include stdlib.h#include string.h#inclu.pdf
apleather
 
week-7x
week-7xweek-7x
perl_lessons
perl_lessonsperl_lessons
perl_lessons
tutorialsruby
 
perl_lessons
perl_lessonsperl_lessons
perl_lessons
tutorialsruby
 
DAA Lab File C Programs
DAA Lab File C ProgramsDAA Lab File C Programs
DAA Lab File C Programs
Kandarp Tiwari
 

Similar to Elf文件解析 (20)

selection_sort..c#include stdio.hheader file input output func.pdf
selection_sort..c#include stdio.hheader file input output func.pdfselection_sort..c#include stdio.hheader file input output func.pdf
selection_sort..c#include stdio.hheader file input output func.pdf
 
VTU Data Structures Lab Manual
VTU Data Structures Lab ManualVTU Data Structures Lab Manual
VTU Data Structures Lab Manual
 
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
1sequences and sampling. Suppose we went to sample the x-axis from X.pdf
 
III MCS python lab (1).pdf
III MCS python lab (1).pdfIII MCS python lab (1).pdf
III MCS python lab (1).pdf
 
C lab manaual
C lab manaualC lab manaual
C lab manaual
 
Basic C Programming Lab Practice
Basic C Programming Lab PracticeBasic C Programming Lab Practice
Basic C Programming Lab Practice
 
Academy PRO: ES2015
Academy PRO: ES2015Academy PRO: ES2015
Academy PRO: ES2015
 
Hangman Game Programming in C (coding)
Hangman Game Programming in C (coding)Hangman Game Programming in C (coding)
Hangman Game Programming in C (coding)
 
Struct examples
Struct examplesStruct examples
Struct examples
 
SWP - A Generic Language Parser
SWP - A Generic Language ParserSWP - A Generic Language Parser
SWP - A Generic Language Parser
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 058 solved assignment
BCSL 058 solved assignment
 
Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.
 
RIDA PROJECT
RIDA PROJECTRIDA PROJECT
RIDA PROJECT
 
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets
 
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets
 
#include stdio.h#include stdlib.h#include string.h#inclu.pdf
#include stdio.h#include stdlib.h#include string.h#inclu.pdf#include stdio.h#include stdlib.h#include string.h#inclu.pdf
#include stdio.h#include stdlib.h#include string.h#inclu.pdf
 
week-7x
week-7xweek-7x
week-7x
 
perl_lessons
perl_lessonsperl_lessons
perl_lessons
 
perl_lessons
perl_lessonsperl_lessons
perl_lessons
 
DAA Lab File C Programs
DAA Lab File C ProgramsDAA Lab File C Programs
DAA Lab File C Programs
 

Recently uploaded

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
Techgropse Pvt.Ltd.
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 

Recently uploaded (20)

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 

Elf文件解析

  • 4. 大端小端 Inter 摩托罗拉
  • 6.
  • 10. 1. Upload Sky shell with 'exec' command and symbols (requires several recompilations to generate correct symbols): > make sky-shell-exec.sky 编译内核 > make sky-shell-exec.sky CORE=sky-shell-exec.sky 生成symbols > make sky-shell-exec.upload CORE=sky-shell-exec.sky 再次编译内核 如果直接执行第二条命令,可以生成sky-shell-exec.sky , symbols为空,
  • 11. Symbols怎么生成 • Makefile.msp430中 ifdef CORE symbols.c: # @${CONTIKI}/tools/msp430-make-symbols $(CORE) $(NM) $(CORE) | awk -f $(CONTIKI)/tools/mknmlist > symbols.c else symbols.c symbols.h: @${CONTIKI}/tools/make-empty-symbols Endif
  • 12. 命令 • Msp430-nm - list symbols from object files • awk [options] -f scriptfile var=value file(s) awk是一种编程语言,用于在linux/unix下对文本和数据进 行处理。数据可以来自标准输入、一个或多个文件,或其 它命令的输出。它支持用户自定义函数和动态正则表达式 等先进功能,是linux/unix下的一个强大编程工具。它在命 令行中使用,但更多是作为脚本来使用。awk的处理文本 和数据的方式是这样的,它逐行扫描文件,从第一行到最 后一行,寻找匹配的特定模式的行,并在这些行上进行你 想要的操作。如果没有指定处理动作,则把匹配的行显示 到标准输出(屏幕),如果没有指定模式,则所有被操作所 指定的行都被处理。
  • 13. mknmlist /^[0123456789abcdef]+ [ABCDGRSTUVW] / { if ($3 != "symbols" && $3 != "symbols_nelts") { name[nname] = $3; nname++; function sort(V, N, tmp, i, j) { } V[-1] = ""; # Used as a sentinel before V[0]. } for (i = 1; i < N; i++) for (j = i; V[j - 1] > V[j]; j--) { END { tmp = V[j]; sort(name, nname); V[j] = V[j - 1]; V[j - 1] = tmp; } print "#include "loader/symbols.h"n"; return; } # Must deal with compiler builtins etc. for (x = 0; x < nname; x++) { BEGIN { if (builtin[name[x]] != "") nname = 0; print builtin[name[x]] ";"; builtin["printf"] = "int printf(const char *, ...)"; else builtin["sprintf"] = "int sprintf(char *, const print "extern int " name[x]"();"; char *, ...)"; } builtin["malloc"] = "void *malloc()"; print "n"; builtin["calloc"] = "void *calloc()"; builtin["memcpy"] = "void *memcpy()"; # nname++: An { 0, 0 } entry is added at the end of the vector. builtin["memset"] = "void *memset()"; print "const int symbols_nelts = " nname+1 ";"; builtin["memmove"] = "void *memmove()"; print "const struct symbols symbols[" nname+1 "] = {"; builtin["strcpy"] = "char *strcpy()"; for (x = 0; x < nname; x++) builtin["strchr"] = "char *strchr()"; print "{ "" name[x] "", (void *)&"name[x]" },"; builtin[""] = ""; print "{ (const char *)0, (void *)0} };"; } }