/* Starting with int main() { return 0; } we changed the program and compilation/linking as needed to: * make ".data" have the size 12 * make ".rodata" have the size 48 * make ".strtab" grow by 17 * make ".text" grow by at least 32 * make ".got.plt" bigger * make ".rela.dyn" bigger */ #include char data[] = {'a', 'b','c','d','e','f','g','h'}; /* increases ".data" */ const long data2 = 2; /* This an next 3 lines increase ".rodata" */ const long data3 = 3; const long data4 = 4; const long data5 = 5; int main() { /* These two lines by themselves had no effect */ int a = 4; int b = a + 2; printf("%d\n", b); /* adding a printf() call grew ".text" */ printf("%d\n", b); fprintf(stderr, "%p\n", malloc(32)); /* adding malloc() grew ".got.plt" */ /* adding `stderr` above grew ".rela.dyn" */ return 0; } /* function name made ".strtab" grow by 17 */ int foodfoodfoodfood() { return 1; }