tkt
This commit is contained in:
10
SCR2.1/ARM/TP16/Reponses-tp16.txt~
Normal file
10
SCR2.1/ARM/TP16/Reponses-tp16.txt~
Normal file
@@ -0,0 +1,10 @@
|
||||
1)
|
||||
|
||||
uname -m
|
||||
|
||||
x86_64
|
||||
|
||||
2)
|
||||
cat /proc/cpuinfo | grep "model name"
|
||||
|
||||
model name : Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
|
||||
BIN
SCR2.1/ARM/TP16/a.out
Executable file
BIN
SCR2.1/ARM/TP16/a.out
Executable file
Binary file not shown.
BIN
SCR2.1/ARM/TP16/printHW.o
Normal file
BIN
SCR2.1/ARM/TP16/printHW.o
Normal file
Binary file not shown.
24
SCR2.1/ARM/TP16/printHW.s
Normal file
24
SCR2.1/ARM/TP16/printHW.s
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
Lines enclosed here are comments
|
||||
A small program: prints "Hello World!"
|
||||
*/
|
||||
// From // to the end of this line is a comment: next are directives to the assembler
|
||||
.equ SYS_EXIT, 93
|
||||
.equ SYS_WRITE, 64
|
||||
.data // tells assembler to assemble the following in the data section
|
||||
msg: .asciz "Hello World!\n" //msg retains the address of the string
|
||||
.text // tells assembler to assemble the following
|
||||
// in the text (code) section
|
||||
.globl _start // _start is there where the program starts,
|
||||
// .globl makes it visible to the linker
|
||||
_start:
|
||||
mov x0,#1 // value 1 is placed in register x0
|
||||
adr x1,msg // the address retained by label msg is placed in register x1
|
||||
mov x2,#13
|
||||
mov w8, #SYS_WRITE // svc must find the syscall number in w8
|
||||
// and the syscall arguments in x0,x1,x2
|
||||
svc #0 // invoke syscall: displays on the screen
|
||||
mov x0, #0 // in x0 put the value you want to exit with
|
||||
mov w8,#SYS_EXIT
|
||||
svc #0
|
||||
.end
|
||||
32
SCR2.1/ARM/TP16/solar-TP16-5-reponses.txt
Normal file
32
SCR2.1/ARM/TP16/solar-TP16-5-reponses.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
On commence le tp on faisant ssh 172.16.3.178
|
||||
|
||||
1.
|
||||
on peut utiliser la commande uname -a
|
||||
ou
|
||||
On utilise la commande file /lib/systemd/* .
|
||||
|
||||
/lib/systemd/systemd-user-sessions: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=0f2486b01f56eccc8508f57e5368a85596b5def8, for GNU/Linux 3.7.0, stripped
|
||||
/lib/systemd/systemd-veritysetup: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=490eef8732d10f68818f236f5ae07aac17d36f32, for GNU/Linux 3.7.0, stripped
|
||||
/lib/systemd/systemd-volatile-root: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=2527638aa270e6db3bdc5f0ca199da65450a120d, for GNU/Linux 3.7.0, stripped
|
||||
/lib/systemd/systemd-xdg-autostart-condition: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=35a2d9040992e606a16b0674c8ae1c602a308f78, for GNU/Linux 3.7.0, stripped
|
||||
|
||||
Nous pouvons constater que tous le exécutables correspondants sont 64 bits, donc c'est un 64-bit OS
|
||||
|
||||
2.
|
||||
On peut utilisé la commande lscpu .
|
||||
|
||||
Nous pouvons voir si l'Architecture est aarch64
|
||||
|
||||
Rappel :
|
||||
Le descripteur de fichier associé a :
|
||||
-> la sortie standard des erreurs est le numéro 2.
|
||||
-> la sortie standard des résultat est le numéro 1.
|
||||
-> l'entrée sandard est le numéro 0.
|
||||
|
||||
Write ( (on met ici le descripteur de fichier qu'il faut) , buf,(nbr_doctets_a_partir_de_buf) );
|
||||
|
||||
On peux utiliser la commande less /usr/include/asm-generic/unistd.h pour savoir quel est la sortie par exemple en fait /write on sait que c'est 64.
|
||||
|
||||
j'utilise la commande as -gstabs -o printHW.o printfHW.s
|
||||
puis ld -O0 printHW.o
|
||||
|
||||
BIN
SCR2.1/ARM/TP16/tp16.SCR.2.1.pdf
Normal file
BIN
SCR2.1/ARM/TP16/tp16.SCR.2.1.pdf
Normal file
Binary file not shown.
Reference in New Issue
Block a user