Skip to content

created(markdown): newfile.md #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .helloworld.md.swp
Binary file not shown.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Markdown Workshop

This branch was updated by cosmin.

This is a practical workshop about the syntax and the use of the [Markdown format](https://www.markdownguide.org/basic-syntax/).
In particular, we will focus on the [GitHub Flavored Markdown](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax), used by GitHub.
See the full specification of the GitHub Flavored Markdown [here](https://github.github.com/gfm/).
Expand Down
12 changes: 6 additions & 6 deletions dynamic-linking.ro.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Diferența este că acum, folosim linkare dinamică în loc de linkare statică
Pentru aceasta, am renunțat la argumentul `-static` folosit la linkare.

Pentru acest exemplu, obținem un singur executabil `main`, din legarea statică cu biblioteca `libinc.a` și legarea dinamică cu biblioteca standard C.
Similar exemplului din directorul `05-static/, folosim comanda `make` pentru a obține executabilul `main`:
Similar exemplului din directorul `05-static/`, folosim comanda make pentru a obține executabilul `main`:

```console
[..]/06-dynamic$ ls
Expand All @@ -39,7 +39,7 @@ main: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically link

[..]/06-dynamic$ file ../05-static/main
../05-static/main: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=60adf8390374c898998c0b713a8b1ea0c255af38, not stripped
``
```

Fișierul executabil `main` obținut prin linkare dinamică are un comportament identic fișierului executabil `main` obținut prin linkare statică.
Observăm că dimensiunea sa este mult mai redusă: ocupă `7 KB` comparativ cu `600 KB` cât avea varianta sa statică.
Expand All @@ -66,7 +66,7 @@ Investigăm simbolurile executabilului:

Simbolurile obținute din modulul obiect `main.o` și din biblioteca statică `libinc.o` sunt rezolvate și au adrese stabilite.
Observăm că folosirea bibliotecii standard C a dus la existența simboblului `_start`, care este entry pointul programului.
Dar, simbolurile din biblioteca standard C, (`printf`, __libc_start_main`) sunt marcate ca nedefinite (`U`).
Dar, simbolurile din biblioteca standard C, (`printf`, `__libc_start_main`) sunt marcate ca nedefinite (`U`).
Aceste simboluri nu sunt prezente în executabil: rezolvarea, stabilirea adreselor și relocarea lor se va realiza mai târziu, la încărcare (load time).

La încărcare, o altă componentă software a sistemului, loaderul / linkerul dinamic, se va ocupa de:
Expand All @@ -77,7 +77,7 @@ La încărcare, o altă componentă software a sistemului, loaderul / linkerul d

Putem investiga bibliotecile dinamice folosite de un executabil prin intermediul utilitarului `ldd`:

``console
```console
[..]/06-dynamic$ ldd main
linux-gate.so.1 (0xf7f97000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7d8a000)
Expand All @@ -99,8 +99,8 @@ De aici este, în Linux, extensia `.so` a fișierelor de tip bibliotecă partaja

## Biblioteci cu linkare dinamică

Numele corect al unei biblioteci dinamice este bibliotecă cu linkare dinamică (*dynamically linked library*) sau bibliotecă partajată.
În Windows, bibliotecile dinamice sunt numite *dynamic-link libraries* de unde și extensia `.dll`.
Numele corect al unei biblioteci dinamice este bibliotecă cu linkare dinamică (**dynamically linked library**) sau bibliotecă partajată.
În Windows, bibliotecile dinamice sunt numite **dynamic-link libraries** de unde și extensia `.dll`.

Din punctul de vedere al comenzii folosite, nu diferă linkarea unei biblioteci dinamice sau a unei biblioci statice.
Diferă executabilul obținut, care va avea nedefinite simbolurile folosite din bibliotecile dinamice.
Expand Down
127 changes: 127 additions & 0 deletions helloworld.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Helloworld programs
---

![Hello World PNG](helloworld.png)

We list below Helloworld programs for diff erent programming languages, i.e. programs that print "Hello, World!". Thespecifi ed compiler or interpreter is required for each programming languages.
The table below summarizes the programs:


| Language | Language (Spec) Site | Section | Build / Run Toolchain | Debian / Ubuntu Packages |
|----------|----------------------|---------|-----------------------|--------------------------|
|C |[The Standard - C](https://www.iso-9899.info/wiki/The_Standard) |[C](#) | GCC | build-essential |
|C++ |[The Standard - C++](https://isocpp.org/std/the-standard) |[C++](#) | GCC / G++ | build-essential, g++ |
|Dlang |[D Programming Language: Home](https://dlang.org/) |[Dlang](#) | GCC / GDC | build-essential, gdc |
|Go |[The Go Programming Language](https://go.dev/) |[Go](#) | Go | golang |
|Rust |[Rust Programming Language](https://www.rust-lang.org/) |[Rust](#) | Rust (Crate) | rustlang |
|Java |[Java Programming Language](https://docs.oracle.com/javase/8/docs/technotes/guides/language/) |[Java](#) | JDK | openjdk-17-jdk |
|x86_64
assembly |[x86 and amd64 instruction reference](https://www.felixcloutier.com/x86/) |[x86_64Assembly](#) | GCC / GAS | build-essential |
|ARM64
assembly |[Arm A64 Instruction Set Architecture](https://developer.arm.com/documentation/ddi0596/latest/) |[ARM64 Assembly](#) | GCC / GAS (AArch64) | build-essential |
|Bash |[Bash Reference Manual](https://www.gnu.org/software/bash/manual/bash.html) |[Bash](#) | Bash | bash |
|Python |[Welcome to Python.org](https://www.python.org/) |[Python](#) | Python | python |
|Ruby |[Ruby Programming Language](https://www.ruby-lang.org/en/) |[Ruby](#) | Ruby | ruby |
|PHP |[PHP: Hypertext Preprocessor](https://www.php.net/) |[PHP](#) | PHP | php |
|Perl |[The Perl Programming Language](https://www.perl.org/) |[Perl](#) | Perl | perl |
|Lua |[The Programming Language Lua](https://www.lua.org/) |[Lua](#) | Lua | lua |

## C
---

```c
#include <stdio.h>

int main(void)
{
puts("Hello, World!");
return 0;
}

```

Build with:

```
gcc -Wall -o helloworld helloworld.c
```

Run with:


```
./helloworld
```

## C++
---

```cpp
#include <iostream>

int main()
{
std :: cout << "Hello, World!" << std :: endl;
return 0;
}

```

Build with:

```
g++ -Wall -o helloworld helloworld.cpp
```

Run with:


```
./helloworld
```

## Dlang
---

```d
import std.stdio

void main()
{
writeln("Hello, World!");
}

```

Build with:

```
gdc -Wall -o helloworld helloworld.cpp
```

Run with:


```
./helloworld
```

## Go
---

```go
package main

import "fmt"

funct main(){
fmt.Println("Hello, World!");
}

```

Build and run with:

```
go run helloworld.go
```
34 changes: 34 additions & 0 deletions newfile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This file contains examples of markdown formatting


This file was created by [Cosmin](https://github.com/cosminstr).

```c
#include <stdio.h>

int main(){
printf("Hello, World");
return 0;
}

```

| Column 1 | Column 2 |
| ---------- | ----------- |
| Content1.1 | Content 2.1 |
| Content1.2 | Content 2.2 |

1. Ordered list item 1
2. Ordered list item 2
3. Ordered list item 3


- Unordered list item 1
- Unordered list item 2
- Unordered list item 3


![Image from the ROSEdu Markdown Workshop](https://github.com/rosedu/workshop-markdown/blob/main/helloworld.png)

Hope this files helps :+1:.