From c5fcf7179a83ef65c86c6a4a390029149e518649 Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Tue, 5 Oct 2021 21:49:54 +0200 Subject: Duzy commit ze smieciami --- Semestr 4/ask/lista8/._lista_8 | Bin 212 -> 0 bytes Semestr 4/ask/lista8/ask21_lista_8.tgz | Bin 2136 -> 0 bytes Semestr 4/ask/lista8/bar.c | 5 - Semestr 4/ask/lista8/even.c | 8 - Semestr 4/ask/lista8/foo.c | 5 - Semestr 4/ask/lista8/lazy.c | 7 - Semestr 4/ask/lista8/main.lds | 39 ----- Semestr 4/ask/lista8/merge-1.map | 300 -------------------------------- Semestr 4/ask/lista8/merge-2.map | 301 --------------------------------- Semestr 4/ask/lista8/mismatch-a.c | 7 - Semestr 4/ask/lista8/mismatch-b.c | 8 - Semestr 4/ask/lista8/odd.c | 8 - Semestr 4/ask/lista8/relo3.c | 15 -- Semestr 4/ask/lista8/start.c | 8 - Semestr 4/ask/lista8/str-a.c | 10 -- Semestr 4/ask/lista8/str-b.c | 9 - Semestr 4/ask/lista8/swap.c | 18 -- 17 files changed, 748 deletions(-) delete mode 100755 Semestr 4/ask/lista8/._lista_8 delete mode 100644 Semestr 4/ask/lista8/ask21_lista_8.tgz delete mode 100644 Semestr 4/ask/lista8/bar.c delete mode 100644 Semestr 4/ask/lista8/even.c delete mode 100644 Semestr 4/ask/lista8/foo.c delete mode 100644 Semestr 4/ask/lista8/lazy.c delete mode 100644 Semestr 4/ask/lista8/main.lds delete mode 100644 Semestr 4/ask/lista8/merge-1.map delete mode 100644 Semestr 4/ask/lista8/merge-2.map delete mode 100644 Semestr 4/ask/lista8/mismatch-a.c delete mode 100644 Semestr 4/ask/lista8/mismatch-b.c delete mode 100644 Semestr 4/ask/lista8/odd.c delete mode 100644 Semestr 4/ask/lista8/relo3.c delete mode 100644 Semestr 4/ask/lista8/start.c delete mode 100644 Semestr 4/ask/lista8/str-a.c delete mode 100644 Semestr 4/ask/lista8/str-b.c delete mode 100644 Semestr 4/ask/lista8/swap.c (limited to 'Semestr 4/ask/lista8') diff --git a/Semestr 4/ask/lista8/._lista_8 b/Semestr 4/ask/lista8/._lista_8 deleted file mode 100755 index 893436c..0000000 Binary files a/Semestr 4/ask/lista8/._lista_8 and /dev/null differ diff --git a/Semestr 4/ask/lista8/ask21_lista_8.tgz b/Semestr 4/ask/lista8/ask21_lista_8.tgz deleted file mode 100644 index 789c9af..0000000 Binary files a/Semestr 4/ask/lista8/ask21_lista_8.tgz and /dev/null differ diff --git a/Semestr 4/ask/lista8/bar.c b/Semestr 4/ask/lista8/bar.c deleted file mode 100644 index 97fbd4f..0000000 --- a/Semestr 4/ask/lista8/bar.c +++ /dev/null @@ -1,5 +0,0 @@ -// extern long foo; - -int bar = 42; -// long *foo_p = &foo; -short dead[15]; diff --git a/Semestr 4/ask/lista8/even.c b/Semestr 4/ask/lista8/even.c deleted file mode 100644 index 5bf8606..0000000 --- a/Semestr 4/ask/lista8/even.c +++ /dev/null @@ -1,8 +0,0 @@ -int is_odd(long n); - -int is_even(long n) { - if (n == 0) - return 1; - else - return is_odd(n - 1); -} diff --git a/Semestr 4/ask/lista8/foo.c b/Semestr 4/ask/lista8/foo.c deleted file mode 100644 index 080d831..0000000 --- a/Semestr 4/ask/lista8/foo.c +++ /dev/null @@ -1,5 +0,0 @@ -// extern int bar; - -long foo = 19; -// int *bar_p = &bar; -char code[17]; diff --git a/Semestr 4/ask/lista8/lazy.c b/Semestr 4/ask/lista8/lazy.c deleted file mode 100644 index fb08cf7..0000000 --- a/Semestr 4/ask/lista8/lazy.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(void) { - puts("first time"); - puts("second time"); - return 0; -} diff --git a/Semestr 4/ask/lista8/main.lds b/Semestr 4/ask/lista8/main.lds deleted file mode 100644 index 25a4ca9..0000000 --- a/Semestr 4/ask/lista8/main.lds +++ /dev/null @@ -1,39 +0,0 @@ -OUTPUT_FORMAT("elf64-x86-64") -OUTPUT_ARCH(i386:x86-64) -ENTRY(_start) -PHDRS -{ - code PT_LOAD FLAGS(5); - rodata PT_LOAD FLAGS(4); - data PT_LOAD FLAGS(6); -} -SECTIONS -{ - . = 0x400000 + SIZEOF_HEADERS; - - .text : - { - *(.text .text.*) - } : code - - .rodata : - { - *(.rodata .rodata.*) - } : rodata - - .data : - { - *(.data .data.*) - } : data - - .bss : - { - *(.bss .bss.*) - *(COMMON) - } : data - - /DISCARD/ : - { - *(.note.gnu.property) - } -} diff --git a/Semestr 4/ask/lista8/merge-1.map b/Semestr 4/ask/lista8/merge-1.map deleted file mode 100644 index 2e93e7c..0000000 --- a/Semestr 4/ask/lista8/merge-1.map +++ /dev/null @@ -1,300 +0,0 @@ - -Merging program properties - - -Discarded input sections - - .note.gnu.property - 0x0000000000000000 0x20 bar.o - -Memory Configuration - -Name Origin Length Attributes -*default* 0x0000000000000000 0xffffffffffffffff - -Linker script and memory map - -LOAD foo.o -LOAD bar.o - -.interp - *(.interp) - -.note.gnu.property - 0x0000000000000000 0x20 - .note.gnu.property - 0x0000000000000000 0x20 foo.o - -.note.gnu.build-id - *(.note.gnu.build-id) - -.hash - *(.hash) - -.gnu.hash - *(.gnu.hash) - -.dynsym - *(.dynsym) - -.dynstr - *(.dynstr) - -.gnu.version - *(.gnu.version) - -.gnu.version_d - *(.gnu.version_d) - -.gnu.version_r - *(.gnu.version_r) - -.rela.init - *(.rela.init) - -.rela.text - *(.rela.text) - -.rela.fini - *(.rela.fini) - -.rela.rodata - *(.rela.rodata) - -.rela.data.rel.ro - *(.rela.data.rel.ro) - -.rela.data - *(.rela.data) - -.rela.tdata - *(.rela.tdata) - -.rela.tbss - *(.rela.tbss) - -.rela.ctors - *(.rela.ctors) - -.rela.dtors - *(.rela.dtors) - -.rela.got - *(.rela.got) - -.rela.bss - *(.rela.bss) - -.rela.ldata - *(.rela.ldata) - -.rela.lbss - *(.rela.lbss) - -.rela.lrodata - *(.rela.lrodata) - -.rela.ifunc - *(.rela.ifunc) - -.rela.plt - *(.rela.plt) - -.init - *(SORT_NONE(.init)) - -.plt - *(.plt) - -.plt.got - *(.plt.got) - -.plt.sec - *(.plt.sec) - -.text 0x0000000000000000 0x0 - *(.text .stub) - .text 0x0000000000000000 0x0 foo.o - .text 0x0000000000000000 0x0 bar.o - *(.gnu.warning) - -.fini - *(SORT_NONE(.fini)) - -.rodata - *(.rodata) - -.rodata1 - *(.rodata1) - -.eh_frame_hdr - *(.eh_frame_hdr) - -.eh_frame - *(.eh_frame) - -.gcc_except_table - *(.gcc_except_table) - -.gnu_extab - *(.gnu_extab*) - -.exception_ranges - *(.exception_ranges) - -.eh_frame - *(.eh_frame) - -.gnu_extab - *(.gnu_extab) - -.gcc_except_table - *(.gcc_except_table) - -.exception_ranges - *(.exception_ranges) - -.tdata - *(.tdata) - -.tbss - *(.tbss) - -.jcr - *(.jcr) - -.dynamic - *(.dynamic) - -.got - *(.got) - -.got.plt - *(.got.plt) - -.data 0x0000000000000000 0xc - *(.data) - .data 0x0000000000000000 0x8 foo.o - 0x0000000000000000 foo - .data 0x0000000000000008 0x4 bar.o - 0x0000000000000008 bar - -.data1 - *(.data1) - -.bss 0x0000000000000000 0x3e - *(.bss) - .bss 0x0000000000000000 0x11 foo.o - 0x0000000000000000 code - *fill* 0x0000000000000011 0xf - .bss 0x0000000000000020 0x1e bar.o - 0x0000000000000020 dead - -.lbss - *(.lbss) - -.lrodata - *(.lrodata) - -.ldata - *(.ldata) - -.stab - *(.stab) - -.stabstr - *(.stabstr) - -.stab.excl - *(.stab.excl) - -.stab.exclstr - *(.stab.exclstr) - -.stab.index - *(.stab.index) - -.stab.indexstr - *(.stab.indexstr) - -.comment 0x0000000000000000 0x56 - *(.comment) - .comment 0x0000000000000000 0x2b foo.o - .comment 0x000000000000002b 0x2b bar.o - -.note.GNU-stack - 0x0000000000000000 0x0 - .note.GNU-stack - 0x0000000000000000 0x0 foo.o - .note.GNU-stack - 0x0000000000000000 0x0 bar.o - -.gnu.build.attributes - *(.gnu.build.attributes) - -.debug - *(.debug) - -.line - *(.line) - -.debug_srcinfo - *(.debug_srcinfo) - -.debug_sfnames - *(.debug_sfnames) - -.debug_aranges - *(.debug_aranges) - -.debug_pubnames - *(.debug_pubnames) - -.debug_info - *(.debug_info) - -.debug_abbrev - *(.debug_abbrev) - -.debug_line - *(.debug_line) - -.debug_frame - *(.debug_frame) - -.debug_str - *(.debug_str) - -.debug_loc - *(.debug_loc) - -.debug_macinfo - *(.debug_macinfo) - -.debug_weaknames - *(.debug_weaknames) - -.debug_funcnames - *(.debug_funcnames) - -.debug_typenames - *(.debug_typenames) - -.debug_varnames - *(.debug_varnames) - -.debug_pubtypes - *(.debug_pubtypes) - -.debug_ranges - *(.debug_ranges) - -.debug_macro - *(.debug_macro) - -.debug_addr - *(.debug_addr) - -.gnu.attributes - *(.gnu.attributes) -OUTPUT(merge-1.o elf64-x86-64) diff --git a/Semestr 4/ask/lista8/merge-2.map b/Semestr 4/ask/lista8/merge-2.map deleted file mode 100644 index 2677803..0000000 --- a/Semestr 4/ask/lista8/merge-2.map +++ /dev/null @@ -1,301 +0,0 @@ - -Merging program properties - - -Discarded input sections - - .note.gnu.property - 0x0000000000000000 0x20 foo.o - -Memory Configuration - -Name Origin Length Attributes -*default* 0x0000000000000000 0xffffffffffffffff - -Linker script and memory map - -LOAD bar.o -LOAD foo.o - -.interp - *(.interp) - -.note.gnu.property - 0x0000000000000000 0x20 - .note.gnu.property - 0x0000000000000000 0x20 bar.o - -.note.gnu.build-id - *(.note.gnu.build-id) - -.hash - *(.hash) - -.gnu.hash - *(.gnu.hash) - -.dynsym - *(.dynsym) - -.dynstr - *(.dynstr) - -.gnu.version - *(.gnu.version) - -.gnu.version_d - *(.gnu.version_d) - -.gnu.version_r - *(.gnu.version_r) - -.rela.init - *(.rela.init) - -.rela.text - *(.rela.text) - -.rela.fini - *(.rela.fini) - -.rela.rodata - *(.rela.rodata) - -.rela.data.rel.ro - *(.rela.data.rel.ro) - -.rela.data - *(.rela.data) - -.rela.tdata - *(.rela.tdata) - -.rela.tbss - *(.rela.tbss) - -.rela.ctors - *(.rela.ctors) - -.rela.dtors - *(.rela.dtors) - -.rela.got - *(.rela.got) - -.rela.bss - *(.rela.bss) - -.rela.ldata - *(.rela.ldata) - -.rela.lbss - *(.rela.lbss) - -.rela.lrodata - *(.rela.lrodata) - -.rela.ifunc - *(.rela.ifunc) - -.rela.plt - *(.rela.plt) - -.init - *(SORT_NONE(.init)) - -.plt - *(.plt) - -.plt.got - *(.plt.got) - -.plt.sec - *(.plt.sec) - -.text 0x0000000000000000 0x0 - *(.text .stub) - .text 0x0000000000000000 0x0 bar.o - .text 0x0000000000000000 0x0 foo.o - *(.gnu.warning) - -.fini - *(SORT_NONE(.fini)) - -.rodata - *(.rodata) - -.rodata1 - *(.rodata1) - -.eh_frame_hdr - *(.eh_frame_hdr) - -.eh_frame - *(.eh_frame) - -.gcc_except_table - *(.gcc_except_table) - -.gnu_extab - *(.gnu_extab*) - -.exception_ranges - *(.exception_ranges) - -.eh_frame - *(.eh_frame) - -.gnu_extab - *(.gnu_extab) - -.gcc_except_table - *(.gcc_except_table) - -.exception_ranges - *(.exception_ranges) - -.tdata - *(.tdata) - -.tbss - *(.tbss) - -.jcr - *(.jcr) - -.dynamic - *(.dynamic) - -.got - *(.got) - -.got.plt - *(.got.plt) - -.data 0x0000000000000000 0x10 - *(.data) - .data 0x0000000000000000 0x4 bar.o - 0x0000000000000000 bar - *fill* 0x0000000000000004 0x4 - .data 0x0000000000000008 0x8 foo.o - 0x0000000000000008 foo - -.data1 - *(.data1) - -.bss 0x0000000000000000 0x31 - *(.bss) - .bss 0x0000000000000000 0x1e bar.o - 0x0000000000000000 dead - *fill* 0x000000000000001e 0x2 - .bss 0x0000000000000020 0x11 foo.o - 0x0000000000000020 code - -.lbss - *(.lbss) - -.lrodata - *(.lrodata) - -.ldata - *(.ldata) - -.stab - *(.stab) - -.stabstr - *(.stabstr) - -.stab.excl - *(.stab.excl) - -.stab.exclstr - *(.stab.exclstr) - -.stab.index - *(.stab.index) - -.stab.indexstr - *(.stab.indexstr) - -.comment 0x0000000000000000 0x56 - *(.comment) - .comment 0x0000000000000000 0x2b bar.o - .comment 0x000000000000002b 0x2b foo.o - -.note.GNU-stack - 0x0000000000000000 0x0 - .note.GNU-stack - 0x0000000000000000 0x0 bar.o - .note.GNU-stack - 0x0000000000000000 0x0 foo.o - -.gnu.build.attributes - *(.gnu.build.attributes) - -.debug - *(.debug) - -.line - *(.line) - -.debug_srcinfo - *(.debug_srcinfo) - -.debug_sfnames - *(.debug_sfnames) - -.debug_aranges - *(.debug_aranges) - -.debug_pubnames - *(.debug_pubnames) - -.debug_info - *(.debug_info) - -.debug_abbrev - *(.debug_abbrev) - -.debug_line - *(.debug_line) - -.debug_frame - *(.debug_frame) - -.debug_str - *(.debug_str) - -.debug_loc - *(.debug_loc) - -.debug_macinfo - *(.debug_macinfo) - -.debug_weaknames - *(.debug_weaknames) - -.debug_funcnames - *(.debug_funcnames) - -.debug_typenames - *(.debug_typenames) - -.debug_varnames - *(.debug_varnames) - -.debug_pubtypes - *(.debug_pubtypes) - -.debug_ranges - *(.debug_ranges) - -.debug_macro - *(.debug_macro) - -.debug_addr - *(.debug_addr) - -.gnu.attributes - *(.gnu.attributes) -OUTPUT(merge-2.o elf64-x86-64) diff --git a/Semestr 4/ask/lista8/mismatch-a.c b/Semestr 4/ask/lista8/mismatch-a.c deleted file mode 100644 index 39436f2..0000000 --- a/Semestr 4/ask/lista8/mismatch-a.c +++ /dev/null @@ -1,7 +0,0 @@ -/* mismatch-a.c */ -void p2(void); - -int main() { - p2(); - return 0; -} diff --git a/Semestr 4/ask/lista8/mismatch-b.c b/Semestr 4/ask/lista8/mismatch-b.c deleted file mode 100644 index 451d5b3..0000000 --- a/Semestr 4/ask/lista8/mismatch-b.c +++ /dev/null @@ -1,8 +0,0 @@ -/* mismatch-b.c */ -#include - -char main; - -void p2() { - printf("0x%x\n", main); -} diff --git a/Semestr 4/ask/lista8/odd.c b/Semestr 4/ask/lista8/odd.c deleted file mode 100644 index c32961e..0000000 --- a/Semestr 4/ask/lista8/odd.c +++ /dev/null @@ -1,8 +0,0 @@ -int is_even(long n); - -int is_odd(long n) { - if (n == 0) - return 0; - else - return is_even(n - 1); -} diff --git a/Semestr 4/ask/lista8/relo3.c b/Semestr 4/ask/lista8/relo3.c deleted file mode 100644 index 6aca7b6..0000000 --- a/Semestr 4/ask/lista8/relo3.c +++ /dev/null @@ -1,15 +0,0 @@ -int relo3(int val) { - switch (val) { - case 100: - return val; - case 101: - return val + 1; - case 103: - case 104: - return val + 3; - case 105: - return val + 5; - default: - return val + 6; - } -} diff --git a/Semestr 4/ask/lista8/start.c b/Semestr 4/ask/lista8/start.c deleted file mode 100644 index a875ace..0000000 --- a/Semestr 4/ask/lista8/start.c +++ /dev/null @@ -1,8 +0,0 @@ -int is_even(long); - -void _start(void) { - asm volatile( - "syscall" - : /* no output */ - : "a" (0x3c), "D" (is_even(42))); -} diff --git a/Semestr 4/ask/lista8/str-a.c b/Semestr 4/ask/lista8/str-a.c deleted file mode 100644 index 3b0fb36..0000000 --- a/Semestr 4/ask/lista8/str-a.c +++ /dev/null @@ -1,10 +0,0 @@ -#include - -char *somestr(void); - -int main(void) { - char *s = somestr(); - s[5] = '\0'; - puts(s); - return 0; -} diff --git a/Semestr 4/ask/lista8/str-b.c b/Semestr 4/ask/lista8/str-b.c deleted file mode 100644 index 50101cb..0000000 --- a/Semestr 4/ask/lista8/str-b.c +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include - -char *somestr(void) { - char *buf = malloc(sizeof("Hello, world!")); - strcpy(buf, "Hello, world!"); - return buf; -} - diff --git a/Semestr 4/ask/lista8/swap.c b/Semestr 4/ask/lista8/swap.c deleted file mode 100644 index e1966fd..0000000 --- a/Semestr 4/ask/lista8/swap.c +++ /dev/null @@ -1,18 +0,0 @@ -extern int buf[]; - -int *bufp0 = &buf[0]; -static int *bufp1; - -static void incr() { - static int count = 0; - count++; -} - -void swap() { - int temp; - incr(); - bufp1 = &buf[1]; - temp = *bufp0; - *bufp0 = *bufp1; - *bufp1 = temp; -} -- cgit v1.2.3