• Save
gcc and friends
Upcoming SlideShare
Loading in...5
×
 

gcc and friends

on

  • 3,553 views

 

Statistics

Views

Total Views
3,553
Views on SlideShare
3,008
Embed Views
545

Actions

Likes
0
Downloads
0
Comments
0

7 Embeds 545

http://profession.sarika-pugs.com 293
http://sysplay.in 232
http://www.sysplay.in 8
https://www.linkedin.com 5
http://localhost 3
http://shrishti 2
http://www.linkedin.com 2
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

gcc and friends gcc and friends Presentation Transcript

  • gcc & Friends© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> All Rights Reserved.
  • What to Expect?What is gcc?Internals of gccHow to use gcc?Friends of gcc © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 2 All Rights Reserved.
  • What is gcc?GNU C CompilerOpen Source Compiler for C & C++ Along with standard headers & librariesRather a collection of tools Corresponding to various compiler stagesVarious other compilers built using it Cross Compilers for different architectures © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 3 All Rights Reserved.
  • gcc: Internals Decoded gcc gcc -c gcc -S gcc -E.c Pre .i ICG IC (parse trees, ...) ICG .S Assembler .o Linker .exe (machine (machine Processor (as) (ld) independent) dependent) gcc core gcc wrapper © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 4 All Rights Reserved.
  • Using GNU C Compilergcc file.c → Creates the executable a.outgcc file.c -o filegcc -E file.c → Pre-process onlygcc -S file.c → Generate assembly codegcc -c file.c → Create object codegcc -I<hdrs_path> file.cgcc -L<libs_path> file.c -l<lib>gcc -D<define> file.c © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 5 All Rights Reserved.
  • Standard PathsStandard Headers Path: /usr/include/Standard Libraries Path: /usr/lib/Library Prefix: libStandard Headers stdio.h, strings.h, math.h, ...Standard Libraries libc, libm, …Where is the code of printf? © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 6 All Rights Reserved.
  • Friends of gccPreprocessor: cppAssembler: asLinker: ldName Lister: nmDisassembler: objdumpArchiver: arPrint strings from files: strings... © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 7 All Rights Reserved.
  • What all have we learnt?gcc: GNU C Compiler Standard Headers & Libraries Collection of toolsUsage of gccFriends of gcc © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 8 All Rights Reserved.
  • Any Queries?© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 9 All Rights Reserved.
  • Advanced TopicsShared library vs Archive Linking, Library Function Call, ...Defining your own headersCreating a shared libraryCreating an archive © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 10 All Rights Reserved.