Mcrt1.o ve Scrt1.o olan aşağıdaki iki dosyanın kullanımına bağlıyım. Kimse bana bu iki dosyanın ne olduğunu bilmemde yardımcı olabilir. Bu nasıl kullanılır? Performans testi için -pg seçeneği ile derlerken oldukça yararlı olan gcrt1.o örneğini alalım. TeşekkürlerMcrt1.o ve Scrt1.o kullanımı nedir?
5
A
cevap
7
*crt*.o
biçimindeki formlar her zaman C çalışma zamanı başlangıç kodudur (C çalışma zamanı yığınları kitaplıklarda varolma eğilimindedir, başlangıç kodu her zaman gerekli olduğu şekilde bir nesne dosyasıdır).
Çeşitli türlerin açıklamaları, yanıtı kendi kendine yeten hale getirmek için aşağıda kopyalanmış olan here bulunabilir. İlk bazı tanımlar:
Mini FAQ about the misc libc/gcc crt files.
Some definitions:
PIC - position independent code (-fPIC)
PIE - position independent executable (-fPIE -pie)
crt - C runtime
Ardından çeşitli başlatma nesne dosyaları:
crt0.o
Older style of the initial runtime code ? Usually not generated anymore
with Linux toolchains, but often found in bare metal toolchains. Serves
same purpose as crt1.o (see below).
crt1.o
Newer style of the initial runtime code. Contains the _start symbol which
sets up the env with argc/argv/libc _init/libc _fini before jumping to the
libc main. glibc calls this file 'start.S'.
crti.o
Defines the function prolog; _init in the .init section and _fini in the
.fini section. glibc calls this 'initfini.c'.
crtn.o
Defines the function epilog. glibc calls this 'initfini.c'.
Scrt1.o
Used in place of crt1.o when generating PIEs.
gcrt1.o
Used in place of crt1.o when generating code with profiling information.
Compile with -pg. Produces output suitable for the gprof util.
Mcrt1.o
Like gcrt1.o, but is used with the prof utility. glibc installs this as
a dummy file as it's useless on linux systems.
Ve bazıları: Son olarak
crtbegin.o
GCC uses this to find the start of the constructors.
crtbeginS.o
Used in place of crtbegin.o when generating shared objects/PIEs.
crtbeginT.o
Used in place of crtbegin.o when generating static executables.
crtend.o
GCC uses this to find the start of the destructors.
crtendS.o
Used in place of crtend.o when generating shared objects/PIEs.
, sık karşılaşılan bağlantı sırası:
General linking order:
crt1.o crti.o crtbegin.o [-L paths] [user objects] [gcc libs]
[C libs] [gcc libs] crtend.o crtn.o
İlgili konular
- 1. crt0.o ve crt1.o - Fark nedir?
- 2. o satır ve sütun
- 3. 'Evet' 'Hayır' ve 'o
- 4. o ve ben C#
- 5. android: Android O appCategory O Hangi değerler?
- 6. Var t: MyClass = MyClass (o) arasındaki fark nedir; ve var t: MyClass = o MyClass olarak;
- 7. .o dosyaları
- 8. o ana
- 9. SVN o
- 10. o cshtml
- 11. SKSprite o
- 12. ActionScript 3 nedir? O nasıl çalışır?
- 13. Java'daki String.contains() ürününün Big-O nedir?
- 14. Bu algoritmanın Big O analizi nedir?
- 15. Maven o
- 16. o gmail
- 17. o java
- 18. Ctrl + O
- 19. Android Bağlam ve neden o
- 20. Vim'de CTRL-T ve CTRL-O arasındaki fark nedir?
- 21. /arasındaki fark nedir o/ve/\ Ait \ Z/Ruby
- 22. .o .a ve .so dosyaları arasındaki fark nedir?
- 23. Neden TreeSet Iteration O (n) O (n * logn) yerine?
- 24. QSettings - net/bulamıyorsa o
- 25. Büyük O - İç içe
- 26. mongodb: o eşsiz öğeleri
- 27. MapTo Ya sessiz o
- 28. önlenmesi O (n) sorgular
- 29. i Big-O Notasyonu'nu
- 30. Bellek eşleştirmeli I/O vs Port eşlemi I/O
ı don Scrt1.oi'yi hangi senaryoda kullanacağımızı bilmiyorum crt1.o'nun yerine mi? – Daniel