Web App Architecture - Answer- Parser builds data model for every file, sends those values to
web server, web server stores info from that data model in DB server, Web UI requests info from
web server, web server either pulls that from DB or requests a data model from parser
Linux Tool Chain - Answer- sequence of software tools that convert src code to binary
GCC - Answer- GNU Compiler Collection
CPP - Answer- C Preprocessor
- interprets all # in .h .and .c files before compiler sees source code
C Compiler - Answer- compile src into assembly language (.i into .s)
[G]AS - Answer- Assembler
takes assembly code into object code (.s to .o)
LD - Answer- Linker
- stitches .o and referenced system libs into bin exe
- static libs are linked here (dynamic are at run time)
LD.SO - Answer- Loader
- tells OS to execute a program
- OS opens new program and copies segments into virtual memory process
DLOPEN - Answer- Loader
- Program using dynamically linked libs loaded by ld.so when program starts
Macros in Makefiles - Answer- $(THING) = flags/files/commands
CC = gcc - Answer- select GCC compiler as front end
CPPFLAGS - Answer- -Iinclude_file_dir (absolute)
-I~/myproj/include (relative and takes all system and own)
-Dsymbol (#define but in cmd line)
-DNDEBUG (disable assertions)
CFLAGS - Answer- Compiler Flags
-g (save symbols for debugger)
-Wall -std=c11
-fpic
-c
LDFLAGS - Answer- Linker Flags
-Llib_dir
-L~/myproj/lib
-llibrary
, -lfoo
Static lib - Answer- linked at compile time, inflexible, contents copied into exe
Dynamic lib - Answer- linked at run time
shared libs
flexible
default irl
Creating shared lib - Answer- gcc -c prog.c -o prog.o
gcc -shared -o libprog.so prog.o
Creating static lib - Answer- gcc prog.c prog.o -c
ar prog.o -o prog -lprog
XML - Answer- Extensible Markup Language
XML Design goals - Answer- - straightforward to use over internet
- supports lots of apps
- easy to write programs to process XML docs
- human legible, clear
- easy to create docs
- formal and concise
- compatible w/ SGML
XML strong points - Answer- - explicit structure for data manipulation
- decouples presentation from data
- can be used to glue together apps
- modular
- text that's not meant to be read
XML Elements - Answer- If contain other elements, those are child elements
<start tag>content</end tag>
<empty element/>
XML Attributes - Answer- Must not appear outside of start tags or empty element tags
<example name1="val1" name2="val2">content</example>
<example name="val"/>
XSD - Answer- XML Schema Definition (came after DTDs)
DTD - Answer- Document Type Definition
Valgrind - Answer- memory debugging tool, checks leaks, diagnoses memory errors
Valgrind definitely lost - Answer- leaking memory --> allocated and never freed