Wednesday 15 November 2017

Ld Formato Binario Options


Che cosa è File Extension LD da: Jay Geater. Redattore Capo Tecnologia Qualcuno vi ha mandato un file LD e non sei sicuro di come aprirlo Forse avete trovato un file LD sul computer e si chiede quale sia la sua per Windows si potrebbe dire che non puoi aprirlo, o nel peggiore dei casi, si potrebbe incontrare un messaggio di errore di file LD correlati. Prima di poter aprire un file LD, avrete bisogno di capire che tipo di file l'estensione del file LD si riferisce. Suggerimento: gli errori di associazione di file LD non corretti possono essere un sintomo di altri problemi sottostanti all'interno del vostro sistema operativo Windows. Queste voci non valide possono anche produrre sintomi associati come start-up lento di Windows, computer si blocca, e altri problemi di prestazioni del PC. Pertanto, si consiglia vivamente di eseguire la scansione del registro di Windows per le associazioni di file non validi e altre questioni relative a un registro frammentato. file LD sono file non comuni principalmente connessi con driver Paradox Language (Corel). file LD sono anche associati con opzioni utente PC-Bibliothek (Bibliographisches Institut F. A. Brockhaus AG), Codici Telix lunga distanza e FileViewPro. Altri tipi di file possono essere anche mediante l'estensione del file LD. Se siete a conoscenza di altri formati di file che utilizzano l'estensione del file LD, si prega di contattarci in modo che possiamo aggiornare le nostre informazioni di conseguenza. Come per aprire il file LD: LD File Opener Il modo più veloce e più semplice per aprire il file LD è quello di fare doppio clic su di esso. Questo consente all'intelligenza di Windows per decidere la corretta applicazione software per aprire il file LD. Nel caso in cui pretende molto aperto il file LD, è molto probabile che non si ha la corretta applicazione installata sul vostro PC per visualizzare o modificare le estensioni di file LD. Se il PC apre il file LD, ma la sua applicazione sbagliata, youll bisogno di modificare le impostazioni di associazione file del Registro di Windows. In altre parole, Windows sta associando estensioni di file LD con il programma sbagliato. Consigliamo vivamente la scansione del registro di Windows per le associazioni di file non validi e altre questioni Registro di sistema correlate. Download di Software Connesso con LD Estensione file: alcuni formati di file di estensione LD possono essere aperti solo in formato binario. Analisi LD File Strumento Dubbi che tipo di file LD avete Volete sapere esattamente che cosa è, che l'ha creata, e come aprirlo Infine, è ora possibile scoprire tutto quello che c'è da sapere sul vostro file di LD. istantaneamente la LD rivoluzionario file scansioni Analysis Tool, analisi, report e indietro ogni dettaglio circa il file LD. Il nostro algoritmo in attesa di brevetto analizza rapidamente il file, e in pochi istanti, presenta queste informazioni a voi in un elegante, facile da leggere format.8224 In pochi secondi, imparerete esattamente che tipo di file di LD che avete, il programma software associato con il file, l'editore che lo ha creato, il suo stato di sicurezza di sicurezza, e una varietà di altre informazioni utili. Per iniziare la tua analisi gratuito di file, è sufficiente trascinare e rilasciare il file LD all'interno delle linee tratteggiate in basso, oppure fare clic su Sfoglia Risorse del computer e selezionare il file. Il vostro rapporto di analisi di file LD verrà quindi visualizzato direttamente sotto in questa finestra del browser. Trascinare rilasciare i file LD qui per iniziare l'analisi Sfoglia Risorse del computer raquo Si prega di eseguire la scansione anche il mio file di virus Solvusoft: Microsoft Gold Certified SocietàI GNU Linker (eseguibile chiamato LD) è parte del pacchetto binutils. E 'il linker standard sotto Linux e altri systens operativi Unix-like. Esso supporta i formati di input e output esistenti (attraverso l'uso di libbfd), ed è riferito il più flessibile dei linker elencati. Supporta più conosciuti formati di input (ELF, DJGPPCOFF, Win32COFF, a. out, ecc) Supporta formati di output più conosciute (ELF, Win32PE, COFF, a. out ecc). Supporta la creazione di librerie condivise. Fornisce il controllo completo sopra il file di output generato, attraverso il linguaggio flessibile Linker Script. Può creare file binari piatti. Può specificare gli indirizzi codedata, con gli indirizzi di carico e di esecuzione separati (vitali per mezzo del kernel superiore). Supporta NANO, ECOFF e coltellate informazioni di debug. gratuito del software sotto la GPL versione 3. ld non crea le librerie condivise da solo. Devi dare le bandiere propri del compilatore in modo che possa generare codice indipendente dalla posizione (notare che questo sta parlando di ELF librerie condivise solo). LD è in grado di collegare, mantenendo delocalizzazioni nel vostro oggetto finale (chiamato il collegamento incrementale), ed è anche possibile lasciare i simboli non risolti se richiesto di farlo. Si potrebbe anche voler controllare ar. un compagno libreria statica-link per ld. LinksLinux esterno e Unix ld comando ld combina una serie di file oggetto e di archivio, riposiziona i loro dati e le cravatte i riferimenti dei simboli. Di solito l'ultimo passo nella compilazione di un programma è quello di eseguire ld. ld accetta file Linker Comando lingua scritta in un superset di ATampT s sintassi link Editor Command Language, per fornire un controllo esplicito e totale sul processo di collegamento. Per tutti i dettagli sul linguaggio di comando ld, vedere la pagina di informazioni ld. Qui, ben coprire un'ampia panoramica di come utilizzare GNU ld, che viene utilizzato nella maggior parte delle versioni di Linux. Questa versione di ld utilizza le librerie generali scopo BFD per operare su file oggetto. Questo permette di leggere ld, unire, e scrivere file oggetto in molti formati differenti: ad esempio, COFF o a. out. Diversi formati possono essere collegati insieme per produrre qualsiasi tipo di file oggetto disponibile. A parte la sua flessibilità, il linker GNU è più utile di altri linker nel fornire informazioni diagnostiche. Molti linker abbandonano l'esecuzione subito dopo di un errore, quando possibile, ld continua l'esecuzione, che consente di individuare altri errori (o, in alcuni casi, per ottenere un file di output, nonostante l'errore). Il linker ld GNU è destinato a coprire una vasta gamma di situazioni, e di essere il più possibile compatibile con altri linker. Di conseguenza, si hanno molte scelte per controllare il suo comportamento. Il linker supporta molte opzioni della riga di comando, ma in poche effettiva pratica di essi sono utilizzati in qualsiasi contesto particolare. Per esempio, un uso frequente di LD è quello di collegare i file oggetto standard Unix su uno standard, sistema Unix supportato. Su un tale sistema, di collegare un file hello. o: Questo dice ld per produrre un file chiamato uscita come il risultato di collegare il libcrt0.o file con hello. o e la libc. a biblioteca, che arriverà dalla ricerca standard le directory. Vedere l'opzione - l di seguito. Alcune delle opzioni della riga di comando per ld possono essere specificati in qualsiasi punto della riga di comando. Tuttavia, le opzioni che si riferiscono a file, ad esempio - l o - T. causare il file da leggere nel punto in cui l'opzione viene visualizzata nella riga di comando, relativo ai file oggetto e le altre opzioni del file. Ripetendo opzioni non dei file con un argomento diverso sarà o non hanno altro effetto, o ignorare le occorrenze precedenti (quelli più a sinistra sulla riga di comando) di questa opzione. Opzioni che possono essere specificati per significato più di una volta sono indicati nelle descrizioni che seguono. argomenti che non siano opzioni sono file oggetto o archivi che devono essere collegati tra loro. Possono seguire, precedere, o essere mescolato con le opzioni della riga di comando, tranne che un argomento file oggetto non può essere collocato tra un'opzione e il suo argomento. Di solito il linker viene richiamato con almeno un file oggetto, ma è possibile specificare altre forme di file di input binari utilizzando - l. - R. e il linguaggio di comando script. Se non vengono specificati i file di input binari a tutti, il linker non produce alcun output, ed emette il messaggio Nessun file di input. Se il linker non è in grado di riconoscere il formato di un file oggetto, si assume che si tratta di uno script del linker. Uno script specificato in questo modo aumenta lo script del linker principale utilizzato per il collegamento (o lo script predefinito linker o quello specificato utilizzando - T). Questa caratteristica consente al linker di collegare con un file che sembra essere un oggetto o un archivio. ma in realtà si limita a definire alcuni valori dei simboli, o utilizza l'ingresso o GROUP per caricare altri oggetti. Specifica di uno script in questo modo solo aumenta lo script del linker principale, con i comandi aggiuntivi effettuati dopo lo script principale utilizzare l'opzione - T per sostituire lo script predefinito del linker del tutto, ma è da notare l'effetto del comando INSERT. Per le opzioni i cui nomi sono una sola lettera, gli argomenti delle opzioni devono o seguire la lettera opzione senza intervenire spazi. o essere dato come argomenti separati subito dopo l'opzione che li richiede. Per le opzioni i cui nomi sono più lettere, o uno o due cruscotto può precedere il nome di opzione, ad esempio, - trace-simbolo e --trace-simbolo sono equivalenti. Si noti che non vi è una sola eccezione a questa regola: più opzioni di lettere che iniziano con può essere preceduta solo da due trattini una minuscola o. Questo è quello di ridurre la confusione con l'opzione - o. Così, per esempio - omagic imposta il nome del file di output per magia, mentre --omagic imposta la bandiera NMAGIC sull'uscita. Gli argomenti a opzioni multiple lettere devono o essere separati dal nome dell'opzione da un segno di uguale, o essere dati come argomenti separati subito dopo la possibilità che impone loro. Ad esempio, --trace-simbolo foo e --trace-symbolfoo sono equivalenti. Si accettano le abbreviazioni uniche dei nomi di opzioni multiple lettere. Si noti che se il linker viene richiamato indirettamente, tramite un driver del compilatore (ad esempio GCC), allora tutte le opzioni della riga di comando di linker devono essere preceduti da - Wl. (O ciò che è appropriato per il particolare driver del compilatore) in questo modo: Questo è importante, perché altrimenti il ​​programma del driver compilatore può silenziosamente cadere le opzioni del linker, con un conseguente cattivo collegamento. Confusione può presentarsi anche quando passa opzioni che richiedono valori tramite un driver, come l'utilizzo di uno spazio tra atti opzione e l'argomento come separatore, e fa sì che il conducente di passare solo l'opzione di linker e l'argomento al compilatore. In questo caso, è più semplice utilizzare le forme congiunte di entrambe le opzioni a una o più lettere, come: Ecco una tabella della linea di comando generico switch accettato dal linker GNU: Leggere le opzioni della riga di comando da file. Le opzioni lette sono inseriti al posto dell'opzione file originale. Se il file non esiste, o non può essere letto, quindi l'opzione saranno trattati letteralmente, e non rimosso. Opzioni nel file sono separati da spazi bianchi. Un carattere di spazio bianco può essere incluso in una opzione che circonda l'intera opzione tra virgolette singole o doppie. Qualsiasi carattere (tra cui una barra rovesciata) possono essere inclusi premettendo il carattere da inserire con un backslash. Il file può contenere in sé le opzioni di file aggiuntivi tali opzioni saranno trattati in modo ricorsivo. Questa opzione è supportata per la compatibilità HP-UX. L'argomento parola chiave deve essere uno dell'archivio stringhe. condiviso. o di default. - aarchive è funzionalmente equivalente a - Bstatic. e gli altri due parole chiave sono funzionalmente equivalenti a - Bdynamic. Questa opzione può essere utilizzata un numero illimitato di volte. Aggiunge AUDITLIB all'ingresso DTAUDIT della sezione dinamica. AUDITLIB non è selezionata per l'esistenza, né si usa il DTSONAME specificato nella libreria. Se più volte specificato DTAUDIT conterrà due punti elenco separato di interfacce di controllo da utilizzare. Se il linker trova un oggetto con una voce di controllo durante la ricerca di librerie condivise, si aggiungerà una voce corrispondente DTDEPAUDIT nel file di output. Questa opzione ha senso solo su piattaforme ELF che supportano l'interfaccia rtld-audit. Nella versione corrente di ld. questa opzione è utile solo per la famiglia Intel 960 di architetture. In tale configurazione ld, l'argomento dell'architettura identifica la particolare architettura della 960 famiglia, consentendo alcune misure di salvaguardia e la modifica del percorso di ricerca di archivio-biblioteca. Le versioni future di ld possono supportare funzionalità simili per le altre famiglie di architettura. LD può essere configurato per supportare più di un tipo di file oggetto. Se la ld è configurato in questo modo, è possibile utilizzare l'opzione - b per specificare il formato binario per i file oggetto di input che seguono questa opzione sulla riga di comando. Anche quando ld è configurato per supportare i formati di oggetto alternativi, non fate solitamente necessario specificare questo, come LD deve essere configurato in modo da aspettarsi come formato di input di default il più consueto formato su ogni macchina. input-formato è una stringa di testo, il nome di un particolare formato supportato dalle librerie BFD. Si possono elencare i formati binari disponibili con - i objdump. Si consiglia di utilizzare questa opzione se si sta collegando i file con un formato binario insolito. È inoltre possibile utilizzare - b per passare formati in modo esplicito (durante il collegamento file oggetto di diversi formati), includendo input-formato - b prima di ogni gruppo di file oggetto in un particolare formato. Il formato di default è preso dall'ambiente GNUTARGET variabile. È inoltre possibile definire il formato di input da uno script, utilizzando il comando di destinazione Per la compatibilità con i linker prodotte dalla risonanza magnetica, ld accetta file di script scritti in un supplente, linguaggio di comando ristretta, descritti nella sezione Compatibile file script di GNU documentazione ld risonanza magnetica. Introdurre file di script MRI con l'opzione - c utilizzare l'opzione - T per eseguire script del linker scritti nel linguaggio LD di scripting general-purpose. Se MRI-cmdfile non esiste, ld lo cerca nelle directory specificate da qualsiasi opzione - L. Queste tre opzioni sono equivalenti forme multiple sono supportate per la compatibilità con altri linker. Si assegnano spazio per simboli comuni anche se si specifica un file di output mobile (con - r). Il FORCECOMMONALLOCATION comando script ha lo stesso effetto. Aggiunge AUDITLIB all'ingresso DTDEPAUDIT della sezione dinamica. AUDITLIB non è selezionata per l'esistenza, né si usa il DTSONAME specificato nella libreria. Se più volte specificato DTDEPAUDIT conterrà due punti elenco separato di interfacce di controllo da utilizzare. Questa opzione ha senso solo su piattaforme ELF che supportano l'interfaccia rtld-audit. L'opzione - P è previsto per la compatibilità di Solaris. Utilizzare voce come il simbolo esplicito per iniziare l'esecuzione del programma, piuttosto che il punto di ingresso di default. Se non c'è simbolo denominato entrata. il linker cercherà di analizzare l'ingresso come un numero, e l'uso che come indirizzo di entrata (il numero verrà interpretato in base 10 è possibile utilizzare un prefisso 0x per la base 16, o uno 0 per la base 8). Specifica un elenco di librerie di archivio da cui i simboli non devono essere esportati automaticamente. I nomi delle librerie possono essere delimitati da virgole o due punti. Specificando --exclude-libs esclude tutti i simboli in tutte le librerie d'archivio da esportazione automatica. Questa opzione è disponibile solo per l'i386 PE porto mirato del linker e per le porte ELF mirati. Per PE i386, simboli esplicitamente elencati in un file DEF sono ancora esportati, indipendentemente da questa opzione. Per le porte ELF mirati, simboli colpiti da questa opzione saranno trattati come nascosti. Specifica un elenco di file oggetto o membri dell'archivio, dal quale i simboli non devono essere esportati automaticamente, ma che dovrebbe essere copiati all'ingrosso nella libreria di importazione viene generato durante il collegamento. I nomi dei moduli possono essere delimitati da virgole o due punti, e devono corrispondere esattamente i nomi dei file utilizzati da ld Per aprire i file per i membri di archivio, questo è semplicemente il nome del membro, ma per oggetto i file il nome elencato deve includere e abbinare con precisione qualsiasi percorso usato per specificare il file di input sul linker della riga di comando. Questa opzione è disponibile solo per l'i386 PE porta del linker mirati. Simboli esplicitamente elencati in un file DEF sono ancora esportati, indipendentemente da questa opzione. Quando si crea un eseguibile collegato in modo dinamico, utilizzando l'opzione - E o l'opzione --export-dinamica fa sì che il linker per aggiungere tutti i simboli della tabella dei simboli dinamica. La tabella dei simboli dinamica è l'insieme di simboli che sono visibili da oggetti dinamici in fase di esecuzione. Se non si utilizza uno di questi opzioni (o utilizzare l'opzione --no-export-dinamica per ripristinare il comportamento predefinito), la tabella dei simboli dinamica normalmente contiene solo quei simboli che fanno riferimento un oggetto dinamico di cui il link. Se si utilizzano dlopen per caricare un oggetto dinamico che ha bisogno di fare riferimento ai simboli definiti dal programma, piuttosto che qualche altro oggetto dinamico, allora si avrà probabilmente bisogno di utilizzare questa opzione durante il collegamento del programma stesso. È anche possibile utilizzare l'elenco dinamico di controllare ciò che i simboli dovrebbero essere aggiunti alla tabella dei simboli dinamico se il formato di output supporta. Vedere la descrizione di --dynamic-list. Si noti che questa opzione è specifica per le porte ELF mirati. obiettivi PE supportano una funzione simile per esportare tutti i simboli da una DLL o EXE vedere la descrizione della --export-tutti-i simboli qui sotto. Collegare gli oggetti big-endian. Questo riguarda il formato di output predefinito. Collegare gli oggetti little-endian. Questo riguarda il formato di output predefinito. Quando si crea un oggetto ELF condiviso, impostare il campo DTAUXILIARY interno al nome specificato. Questo indica al linker dinamico che la tabella dei simboli dell'oggetto condiviso dovrebbe essere usato come filtro ausiliario sul tavolo simbolo del nome dell'oggetto condiviso. Se in seguito collegare un programma contro questo oggetto filtro, poi, quando si esegue il programma, il linker dinamico vedrà il campo DTAUXILIARY. Se il linker dinamico risolve i simboli dalla oggetto filtro, in primo luogo verificare se vi è una definizione nel nome dell'oggetto condiviso. Se c'è una, verrà usata al posto della definizione in oggetto filtro. Il nome dell'oggetto condiviso non deve esistere. Così il nome oggetto condiviso può essere utilizzato per fornire un'implementazione alternativa di alcune funzioni, forse per debugging o per le prestazioni specifiche della macchina. Questa opzione può essere specificata più di una volta. Le voci DTAUXILIARY saranno creati nello stesso ordine in cui appaiono sulla riga di comando. Quando si crea un oggetto ELF condiviso, impostare il campo DTFILTER interno al nome specificato. Questo indica al linker dinamico che la tabella dei simboli dell'oggetto condiviso che viene creato deve essere utilizzato come filtro sulla tabella dei simboli del nome dell'oggetto condiviso. Se in seguito collegare un programma contro questo oggetto filtro, poi, quando si esegue il programma, il linker dinamico vedrà il campo DTFILTER. Il linker dinamico risolvere i simboli in base alla tabella dei simboli dell'oggetto filtro come al solito, ma sarà effettivamente un collegamento alle definizioni presenti nel nome dell'oggetto condiviso. Così l'oggetto filtro può essere utilizzato per selezionare un sottoinsieme di simboli forniti dal nome dell'oggetto. Alcuni linker anziani utilizzate l'opzione - F per tutta la toolchain di compilazione per specificare formato di file oggetto per entrambi i file oggetto input e di output. Il linker GNU utilizza altri meccanismi per questo scopo: il - b. --formato . opzioni --oformat, il comando TARGET negli script del linker, e la variabile d'ambiente GNUTARGET. Il linker GNU ignorerà l'opzione - F Quando non si crea un oggetto ELF condiviso. Quando si crea un eseguibile ELF o un oggetto condiviso, chiamare NAME quando l'oggetto eseguibile o condiviso viene scaricato, impostando DTFINI all'indirizzo della funzione. Per impostazione predefinita, il linker utilizza Fini come la funzione da chiamare. Ignorato. Previsto per la compatibilità con altri strumenti. Impostare la dimensione massima degli oggetti da ottimizzare usando il registro GP a misura. Questo è significativo solo per i formati di file oggetto, come MIPS ECOFF che supporta mettere oggetti grandi e piccoli in diverse sezioni. Questo viene ignorato per altri formati di file oggetto. Quando si crea un oggetto ELF condiviso, impostare il campo DTSONAME interno al nome specificato. Quando un file eseguibile è collegato con un oggetto condiviso che ha un campo DTSONAME, poi, quando il file eseguibile viene eseguito il linker dinamico tenterà di caricare l'oggetto condiviso specificato dal campo DTSONAME piuttosto che il utilizzando il nome file dato al linker. Eseguire un collegamento incrementale (stessa opzione - r). Quando si crea un eseguibile ELF o un oggetto condiviso, chiamare NAME quando l'oggetto eseguibile o in comune è caricato, impostando DTINIT all'indirizzo della funzione. Per impostazione predefinita, il linker utilizza init come la funzione da chiamare. Aggiungere il file di archivio o di un oggetto specificato da namespec alla lista dei file da collegare. Questa opzione può essere utilizzata un numero illimitato di volte. Se namespec è nella forma: nome del file. ld cercherà il percorso della libreria di un file chiamato nome di file. altrimenti si cercherà il percorso della libreria di un file chiamato lib namespec. a. Su sistemi che supportano le librerie condivise, ld può anche cercare file diversi lib. a namespec. In particolare, sui sistemi ELF e SunOS, ld cercherà una directory per una libreria chiamata lib namespec. so prima di cercare uno chiamato lib namespec. a. Per convenzione, l'estensione. so indica una libreria condivisa. Si noti che questo comportamento non si applica a: nome del file. che specifica sempre un file chiamato nome di file. Il linker cercherà un archivio solo una volta, nella posizione in cui è specificato nella riga di comando. Se l'archivio definisce un simbolo che è stato definito in un oggetto che è apparso prima l'archivio sulla riga di comando, il linker includerà il file appropriato (s) dall'archivio. Tuttavia, un simbolo indefinito in un oggetto che compare in seguito sulla riga di comando non causerà il linker per cercare di nuovo l'archivio. Vedere la -.. (Opzione di un modo per forzare il linker a cercare gli archivi più volte si può elencare lo stesso archivio più volte sulla riga di comando Questo tipo di ricerca di archivio è standard per i linker Unix Tuttavia, se si utilizza ld su. AIX. notare che è diverso dal comportamento del linker AIX. Aggiungi percorso searchdir all'elenco dei percorsi che ld cercherà per le biblioteche d'archivio e script di controllo ld. si può utilizzare questa opzione un numero illimitato di volte. le cartelle vengono ricercati in l'ordine in cui sono specificati nella riga di comando. directory specificate sulla riga di comando vengono consultati prima le directory di default. tutte le opzioni - L si applicano a tutte le opzioni - l, indipendentemente dall'ordine in cui appaiono le opzioni. opzioni - L fanno non influenzano il modo in ricerche LD per uno script del linker opzione - T a meno che non è specificata. Se searchdir inizia con, quindi il sarà sostituito dal prefisso sysroot, essendo specificato un percorso specificato quando il linker è configurato. il set predefinito di percorsi cercato (senza con - L) dipende da quale ld modalità di emulazione sta usando, e in alcuni casi anche da come è stato configurato in fase di compilazione. I percorsi possono anche essere specificati in uno script legame con il comando SEARCHDIR. Directory specificate in questo modo vengono cercati in corrispondenza del punto in cui lo script del linker appare nella linea di comando. Emulare il linker di emulazione. Si possono elencare le emulazioni disponibili con le opzioni --verbose o - V. Se l'opzione - m non viene utilizzata, l'emulazione è preso dalla variabile d'ambiente LDEMULATION, se questo è definito. In caso contrario, l'emulazione di default dipende da come il linker è stato configurato. Stampa una mappa collegamento alla standard output. Una mappa collegamento fornisce informazioni sul collegamento, tra cui la seguente: dove file oggetto vengono mappati nella memoria. Come simboli comuni sono assegnati. Tutti i membri dell'archivio compresi nel collegamento, con una menzione del simbolo che ha causato il membro dell'archivio per essere portato in. I valori assegnati ai simboli. Nota: i simboli i cui valori sono calcolati da un'espressione che comporta un riferimento a un valore precedente dello stesso simbolo non può avere risultato corretto visualizzato nella mappa di collegamento. Questo perché il linker scarta risultati intermedi e conserva solo il valore finale di un'espressione. In tali circostanze il linker visualizzerà il valore finale racchiuso da parentesi quadre. Così, ad esempio uno script del linker contenente: produrrà il seguente output nella mappa link se si utilizza l'opzione - M: Spegnere allineamento della pagina delle sezioni, e disattivare il collegamento con le librerie condivise. Se il formato di output supporta i numeri di magia in stile Unix, marcare l'output come NMAGIC. Impostare le sezioni di testo e dati per essere leggibile e scrivibile. Inoltre, non page-allineare il segmento di dati, e disattivare il collegamento con le librerie condivise. Se il formato di output supporta i numeri di magia in stile Unix, marcare l'output come OMAGIC. Nota: Anche se una sezione di testo scrivibile è consentito per gli obiettivi PE-COFF, non è conforme alla specifica di formato pubblicato da Microsoft. Questa opzione nega la maggior parte degli effetti dell'opzione - N. Esso definisce la sezione testo da sola lettura, e costringe il segmento di dati per essere page-allineato. Nota - questa opzione non consente il collegamento con le librerie condivise. Utilizzare - Bdynamic per questo. Utilizzare l'uscita come nome per il programma prodotto da ld, se questa opzione non è specificata, il nome a. out viene utilizzato per impostazione predefinita. L'output del comando script può anche specificare il nome del file di output. Se il livello è un valore numerico maggiore di zero ld ottimizza l'uscita. Questo potrebbe richiedere molto più tempo e quindi probabilmente dovrebbe essere attivata solo per il binario finale. Al momento Questa opzione ha effetto solo condivise ELF generazione biblioteca. Le versioni future del linker possono fare più uso di questa opzione. Inoltre attualmente non vi è alcuna differenza nel comportamento linkers per i diversi valori diversi da zero di questa opzione. Ancora una volta questo potrebbe cambiare con le versioni future. Lasciare le sezioni di trasferimento e contenuti eseguibili completamente collegate. Posta strumenti di analisi di collegamento e di ottimizzazione possono avere bisogno di tali informazioni al fine di eseguire corrette modifiche di eseguibili. Questo si traduce in grandi eseguibili. Questa opzione è attualmente supportato solo su piattaforme ELF. Forzare il file di output di avere sezioni dinamiche. Questa opzione è specifica per target VxWorks. Generare output relocatable: cioè generare un file di output che può a sua volta servire come input per ld. Questo è spesso chiamato collegamento parziale. Come effetto collaterale, in ambienti che supportano numeri magici standard Unix, questa opzione imposta anche i file di output numero magico per OMAGIC. Se questa opzione non è specificata, un file assoluto viene prodotto. Quando si collegano programmi C, questa opzione non sarà risolvere i riferimenti alle costruttori per farlo, usare - UR. Quando un file di input non ha lo stesso formato del file di output, il collegamento parziale è supportato solo se il file di input non contiene delocalizzazioni. diversi formati di output possono avere ulteriori restrizioni per esempio alcuni a. out formati basati su non supporta il collegamento parziale con i file di input in altri formati a tutti. Questa opzione fa la stessa cosa come - i. Leggi i nomi dei simboli e dei loro indirizzi da nome del file. ma non spostare o includerlo in uscita. In questo modo il file di output per riferirsi simbolicamente alle posizioni assolute di memoria definiti in altri programmi. È possibile utilizzare questa opzione più di una volta. Per la compatibilità con altri linker ELF, se l'opzione - R è seguito da un nome di directory, piuttosto che un nome di file, esso viene considerato come l'opzione - rpath. Omettere tutte le informazioni simbolo dal file di output. Utilizzare scriptfile dello script del linker. Questo script sostituisce ld s script predefinito del linker (piuttosto che aggiungere ad esso), così commandfile deve specificare tutto il necessario per descrivere il file di output. Se scriptfile non esiste nella directory corrente, ld lo cerca nelle directory specificate da qualsiasi opzione - L precedenti. Molteplici opzioni - T si accumulano. Utilizzare file di script come lo script di default del linker. Questa opzione è simile all'opzione --script eccetto che l'elaborazione dello script è ritardata fino a dopo il resto della linea di comando è stato elaborato. Questo permette opzioni posizionate dopo l'opzione --default-script sulla riga di comando per influenzare il comportamento del script del linker, che può essere importante quando la linea di comando del linker non può essere controllato direttamente dall'utente. (Ad esempio perché la linea di comando è stato costruito da un altro strumento, come gcc). simbolo della forza da inserire nel file di output come un simbolo indefinito. Ciò potrebbe, ad esempio, far scattare il collegamento di moduli aggiuntivi da librerie standard. - u può essere ripetuto con argomenti diversi opzione per inserire simboli indefiniti aggiuntivi. Questa opzione è equivalente al comando EXTERN script del linker. Per qualcosa di diverso da programmi C, questa opzione è equivalente a - R. esso genera output relocatable cioè un file di output che può a sua volta servire come input per ld. Quando si collegano programmi C, - UR fa risolvere i riferimenti alle costruttori, a differenza - r. Non funziona per usare - UR su file che sono stati essi stessi legati con - UR una volta che il tavolo costruttore è stato costruito, non può essere aggiunto a. Utilizzare - UR solo per l'ultimo anello parziale e - r per gli altri. Crea una sezione di uscita separata per ogni sezione di ingresso corrispondente sezione o se l'argomento opzionale jolly SEZIONE manca, per ogni sezione di ingresso orfano. Una sezione orfano è uno non specificamente menzionata in uno script del linker. È possibile utilizzare questa opzione più volte sulla linea di comando Previene la normale fusione delle sezioni di ingresso con lo stesso nome, ignorando le assegnazioni sezione di uscita in uno script del linker. Visualizzare il numero di versione di ld. L'opzione - v elenca anche le emulazioni supportate. Altre parole chiave vengono ignorati per la compatibilità di Solaris. --start-gruppo archivi --end-gruppo Gli archivi dovrebbero essere una lista di file di archivio. Essi possono essere sia nomi di file espliciti, o opzioni - l. Gli archivi specificati sono cercati ripetutamente fino a quando non si creano nuovi riferimenti non definiti. Normalmente, un archivio viene cercato solo una volta in modo che esso è specificato nella riga di comando. Se è necessario un simbolo in tale archivio per risolvere un simbolo indefinito di cui da un oggetto in un archivio che appare più tardi nella riga di comando, il linker non sarebbe in grado di risolvere quello di riferimento. Raggruppando gli archivi, tutti essere ricercati più volte fino a quando tutti i possibili riferimenti sono risolti. Utilizzando questa opzione ha un costo significativo delle prestazioni. E 'meglio usarlo solo quando non ci sono riferimenti circolari inevitabili tra due o più archivi. Indica il linker di accettare i file di input la cui architettura non può essere riconosciuto. Il presupposto è che l'utente sa cosa stanno facendo e vuole collegare in questi file di input sconosciuti deliberatamente. Questo è stato il comportamento predefinito del linker, prima del rilascio 2.14. Il comportamento di default dalla versione 2.14 in poi è di rifiutare tali file di input, e quindi l'opzione --accept-sconosciuto-input-arco è stato aggiunto per ripristinare il vecchio comportamento. Questa opzione ha effetto tag ELF DTNEEDED per librerie dinamiche menzionati nella riga di comando dopo l'opzione --come necessaria. Normalmente il linker aggiungere un tag DTNEEDED per ogni libreria dinamica menzionato sulla riga di comando, indipendentemente dal fatto che la libreria è in realtà necessario o no. - come necessaria provoca un tag DTNEEDED essere emessi solo per una libreria che soddisfa un riferimento simbolo indefinito da un file oggetto regolare o, se la libreria non si trova nelle liste DTNEEDED delle altre librerie collegate fino a quel punto, un non definito riferimento simbolo da un'altra libreria dinamica. --no-come-necessaria ripristina il comportamento predefinito. Queste due opzioni sono stati deprecati a causa della somiglianza dei loro nomi alle opzioni - come-necessarie e --no-come-necessaria. Essi sono stati sostituiti da --copy-DT-necessario-voci e --no-copy-DT-necessari-voci. Questa opzione viene ignorata per la compatibilità SunOS. Link contro librerie dinamiche. Questo è significativo solo sulle piattaforme per le quali hanno condiviso le librerie sono supportati. Questa opzione è di solito il default su tali piattaforme. Le diverse varianti di questa opzione sono per la compatibilità con i vari sistemi. You may use this option multiple times on the command line: it affects library searching for - l options which follow it. Set the DF1GROUP flag in the DTFLAGS1 entry in the dynamic section. This causes the runtime linker to handle lookups in this object and its dependencies to be performed only inside the group. --unresolved-symbolsreport-all is implied. This option is only meaningful on ELF platforms which support shared libraries. Do not link against shared libraries. This is only meaningful on platforms for which shared libraries are supported. The different variants of this option are for compatibility with various systems. You may use this option multiple times on the command line: it affects library searching for - l options which follow it. This option also implies --unresolved-symbolsreport-all . This option can be used with - shared . Doing so means that a shared library is being created but that all of the librarys external references must be resolved by pulling in entries from static libraries. When creating a shared library, bind references to global symbols to the definition within the shared library, if any. Normally, it is possible for a program linked against a shared library to override the definition within the shared library. This option is only meaningful on ELF platforms which support shared libraries. When creating a shared library, bind references to global function symbols to the definition within the shared library, if any. This option is only meaningful on ELF platforms which support shared libraries. Specify the name of a dynamic list file to the linker. This is typically used when creating shared libraries to specify a list of global symbols whose references shouldnt be bound to the definition within the shared library, or creating dynamically linked executables to specify a list of symbols which should be added to the symbol table in the executable. This option is only meaningful on ELF platforms which support shared libraries. The format of the dynamic list is the same as the version node without scope and node name. Include all global data symbols to the dynamic list. Provide the builtin dynamic list for C operator new and delete. It is mainly useful for building shared libstdc. Provide the builtin dynamic list for C runtime type identification. Asks the linker not to check section addresses after they have been assigned to see if there are any overlaps. Normally the linker will perform this check, and if it finds any overlaps it will produce suitable error messages. The linker does know about, and does make allowances for sections in overlays. The default behaviour can be restored by using the command line switch --check-sections . Section overlap is not usually checked for relocatable links. You can force checking in that case by using the --check-sections option. This option affects the treatment of dynamic libraries referred to by DTNEEDED tags inside ELF dynamic libraries mentioned on the command line. Normally the linker wont add a DTNEEDED tag to the output binary for each library mentioned in a DTNEEDED tag in an input dynamic library. With --copy-dt-needed-entries specified on the command line however any dynamic libraries that follow it will have their DTNEEDED entries added. The default behaviour can be restored with --no-copy-dt-needed-entries . This option also has an effect on the resolution of symbols in dynamic libraries. With --copy-dt-needed-entries dynamic libraries mentioned on the command line will be recursively searched, following their DTNEEDED tags to other libraries, in order to resolve symbols required by the output binary. With the default setting however the searching of dynamic libraries that follow it will stop with the dynamic library itself. No DTNEEDED links will be traversed to resolve symbols. Output a cross reference table. If a linker map file is being generated, the cross reference table is printed to the map file. Otherwise, it is printed on the standard output. The format of the table is intentionally simple, so that it may be easily processed by a script if necessary. The symbols are printed out, sorted by name. For each symbol, a list of file names is given. If the symbol is defined, the first file listed is the location of the definition. The remaining files contain references to the symbol. This option inhibits the assignment of addresses to common symbols. The script command INHIBITCOMMONALLOCATION has the same effect. The --no-define-common option allows decoupling the decision to assign addresses to Common symbols from the choice of the output file type otherwise a non-Relocatable output type forces assigning addresses to Common symbols. Using --no-define-common allows Common symbols that are referenced from a shared library to be assigned addresses only in the main program. This eliminates the unused duplicate space in the shared library, and also prevents any possible confusion over resolving to the wrong duplicate when there are many dynamic modules with specialized search paths for runtime symbol resolution. Create a global symbol in the output file, containing the absolute address given by expression . You may use this option as many times as necessary to define multiple symbols in the command line. A limited form of arithmetic is supported for the expression in this context: you may give a hexadecimal constant or the name of an existing symbol, or use and - to add or subtract hexadecimal constants or symbols. If you need more elaborate expressions, consider using the linker command language from a script. Note: there should be no white space between symbol, the equals sign ( ), and expression . These options control whether to demangle symbol names in error messages and other output. When the linker is told to demangle, it tries to present symbol names in a readable fashion: it strips leading underscores if they are used by the object file format, and converts C mangled symbol names into user readable names. Different compilers have different mangling styles. The optional demangling style argument can be used to choose an appropriate demangling style for your compiler. The linker will demangle by default unless the environment variable COLLECTNODEMANGLE is set. These options may be used to override the default. Set the name of the dynamic linker. This is only meaningful when generating dynamically linked ELF executables. The default dynamic linker is normally correct dont use this unless you know what you are doing. Treat all warnings as errors. The default behaviour can be restored with the option --no-fatal-warnings . Make sure that an output file has a. exe suffix. If a successfully built fully linked output file does not have a. exe or. dll suffix, this option forces the linker to copy the output file to one of the same name with a. exe suffix. This option is useful when using unmodified Unix makefiles on a Microsoft Windows host, since some versions of Windows wont run an image unless it ends in a. exe suffix. Enable garbage collection of unused input sections. It is ignored on targets that do not support this option. The default behaviour (of not performing this garbage collection) can be restored by specifying --no-gc-sections on the command line. --gc-sections decides which input sections are used by examining symbols and relocations. The section containing the entry symbol and all sections containing symbols undefined on the command-line will be kept, as will sections containing symbols referenced by dynamic objects. Note that when building shared libraries, the linker must assume that any visible symbol is referenced. Once this initial set of sections has been determined, the linker recursively marks as used any section referenced by their relocations. See --entry and --undefined . This option can be set when doing a partial link (enabled with option - r ). In this case the root of symbols kept must be explicitly specified either by an --entry or --undefined option or by a ENTRY command in the linker script. List all sections removed by garbage collection. The listing is printed on stderr. This option is only effective if garbage collection has been enabled via the --gc-sections ) option. The default behaviour (of not listing the sections that are removed) can be restored by specifying --no-print-gc-sections on the command line. Print the name of the default output format (perhaps influenced by other command-line options). This is the string that would appear in an OUTPUTFORMAT linker script command. Print a summary of the command-line options on the standard output and exit. Report unresolved symbols that are contained in shared libraries, but ignore them if they come from regular object files. Report unresolved symbols that come from regular object files, but ignore them if they come from shared libraries. This can be useful when creating a dynamic binary and it is known that all the shared libraries that it should be referencing are included on the linkers command line. The behaviour for shared libraries on their own can also be controlled by the -- no - allow-shlib-undefined option. Normally the linker will generate an error message for each reported unresolved symbol but the option --warn-unresolved-symbols can change this to a warning. Display the version number for ld and list the linker emulations supported. Display which input files can and cannot be opened. Display the linker script being used by the linker. If the optional NUMBER argument gt 1 . plugin symbol status will also be displayed. Specify the name of a version script to the linker. This is typically used when creating shared libraries to specify additional information about the version hierarchy for the library being created. This option is only fully supported on ELF platforms which support shared libraries. It is partially supported on PE platforms, which can use version scripts to filter symbol visibility in auto-export mode: any symbols marked local in the version script will not be exported. Warn when a common symbol is combined with another common symbol or with a symbol definition. Unix linkers allow this somewhat sloppy practice, but linkers on some other operating systems do not. This option allows you to find potential problems from combining global symbols. Unfortunately, some C libraries use this practice, so you may get some warnings about symbols in the libraries as well as in your programs. There are three kinds of global symbols, illustrated here by C examples: A definition, which goes in the initialized data section of the output file. An undefined reference, which does not allocate space. There must be either a definition or a common symbol for the variable somewhere. A common symbol. If there are only (one or more) common symbols for a variable, it goes in the uninitialized data area of the output file. The linker merges multiple common symbols for the same variable into a single symbol. If they are of different sizes, it picks the largest size. The linker turns a common symbol into a declaration, if there is a definition of the same variable. The --warn-common option can produce five kinds of warnings. Each warning consists of a pair of lines: the first describes the symbol just encountered, and the second describes the previous symbol encountered with the same name. One or both of the two symbols will be a common symbol. 1. Turning a common symbol into a reference, because there is already a definition for the symbol. 2. Turning a common symbol into a reference, because a later definition for the symbol is encountered. This is the same as the previous case, except that the symbols are encountered in a different order. 3. Merging a common symbol with a previous same-sized common symbol. 4. Merging a common symbol with a previous larger common symbol. 5. Merging a common symbol with a previous smaller common symbol. This is the same as the previous case, except that the symbols are encountered in a different order. Warn if any global constructors are used. This is only useful for a few object file formats. For formats like COFF or ELF, the linker can not detect the use of global constructors. Warn if multiple global pointer values are required in the output file. This is only meaningful for certain processors, such as the DEC Alpha. Specifically, some processors put large-valued constants in a special section. A special register (the global pointer) points into the middle of this section, so that constants can be loaded efficiently via a base-register relative addressing mode. Since the offset in base-register relative mode is fixed and relatively small (e. g. 16 bits ), this limits the maximum size of the constant pool. Thus, in large programs, it is often necessary to use multiple global pointer values in order to be able to address all possible constants. This option causes a warning to be issued whenever this case occurs. Only warn once for each undefined symbol, rather than once per module which refers to it. Warn if the address of an output section is changed because of alignment. Typically, the alignment will be set by an input section. The address will only be changed if it not explicitly specified that is, if the SECTIONS command does not specify a start address for the section. Warn if the linker adds a DTTEXTREL to a shared object. The GNU linker ld is meant to cover a broad range of situations, and to be as compatible as possible with other linkers. As a result, you have many choices to control its behavior. Here is a summary of the options you can use on the ld command line: This plethora of command-line options may seem intimidating, but in actual practice few of them are used in any particular context. For instance, a frequent use of ld is to link standard Unix object files on a standard, supported Unix system. On such a system, to link a file hello. o. This tells ld to produce a file called output as the result of linking the file libcrt0.o with hello. o and the library libc. a. which will come from the standard search directories. (See the discussion of the - l option below.) The command-line options to ld may be specified in any order, and may be repeated at will. Repeating most options with a different argument will either have no further effect, or override prior occurrences (those further to the left on the command line) of that option. The exceptions--which may meaningfully be used more than once--are - A. - b (or its synonym - format ), - defsym. - L. - l. - R. - u. and -( (or its synonym --start-group ). The list of object files to be linked together, shown as objfile. may follow, precede, or be mixed in with command-line options, except that an objfile argument may not be placed between an option and its argument. Usually the linker is invoked with at least one object file, but you can specify other forms of binary input files using - l. - R. and the script command language. If no binary input files at all are specified, the linker does not produce any output, and issues the message No input files. If the linker can not recognize the format of an object file, it will assume that it is a linker script. A script specified in this way augments the main linker script used for the link (either the default linker script or the one specified by using - T ). This feature permits the linker to link against a file which appears to be an object or an archive, but actually merely defines some symbol values, or uses INPUT or GROUP to load other objects. See section Command Language. For options whose names are a single letter, option arguments must either follow the option letter without intervening whitespace, or be given as separate arguments immediately following the option that requires them. For options whose names are multiple letters, either one dash or two can precede the option name for example, --oformat and - oformat are equivalent. Arguments to multiple-letter options must either be separated from the option name by an equals sign, or be given as separate arguments immediately following the option that requires them. For example, --oformat srec and --oformatsrec are equivalent. Unique abbreviations of the names of multiple-letter options are accepted. - b input-format ld may be configured to support more than one kind of object file. If your ld is configured this way, you can use the - b option to specify the binary format for input object files that follow this option on the command line. Even when ld is configured to support alternative object formats, you dont usually need to specify this, as ld should be configured to expect as a default input format the most usual format on each machine. input-format is a text string, the name of a particular format supported by the BFD libraries. (You can list the available binary formats with objdump - i .) - format input-format has the same effect, as does the script command TARGET. See section BFD. You may want to use this option if you are linking files with an unusual binary format. You can also use - b to switch formats explicitly (when linking object files of different formats), by including - b input-format before each group of object files in a particular format. The default format is taken from the environment variable GNUTARGET. You can also define the input format from a script, using the command TARGET see section Option Commands. - Bstatic Do not link against shared libraries. This is only meaningful on platforms for which shared libraries are supported. - Bdynamic Link against dynamic libraries. This is only meaningful on platforms for which shared libraries are supported. This option is normally the default on such platforms. - Bsymbolic When creating a shared library, bind references to global symbols to the definition within the shared library, if any. Normally, it is possible for a program linked against a shared library to override the definition within the shared library. This option is only meaningful on ELF platforms which support shared libraries. - c MRI-commandfile For compatibility with linkers produced by MRI, ld accepts script files written in an alternate, restricted command language, described in section MRI Compatible Script Files. Introduce MRI script files with the option - c use the - T option to run linker scripts written in the general-purpose ld scripting language. If MRI-cmdfile does not exist, ld looks for it in the directories specified by any - L options. - d - dc - dp These three options are equivalent multiple forms are supported for compatibility with other linkers. They assign space to common symbols even if a relocatable output file is specified (with - r ). The script command FORCECOMMONALLOCATION has the same effect. See section Option Commands. - defsym symbol expression Create a global symbol in the output file, containing the absolute address given by expression. You may use this option as many times as necessary to define multiple symbols in the command line. A limited form of arithmetic is supported for the expression in this context: you may give a hexadecimal constant or the name of an existing symbol, or use and - to add or subtract hexadecimal constants or symbols. If you need more elaborate expressions, consider using the linker command language from a script (see section Assignment: Defining Symbols ). Note: there should be no white space between symbol. the equals sign ( ), and expression. - embedded-relocs This option is only meaningful when linking MIPS embedded PIC code, generated by the - membedded-pic option to the GNU compiler and assembler. Essa provoca il linker per creare una tabella che può essere utilizzato in fase di esecuzione di trasferire tutti i dati che è stato staticamente inizializzato a valori di puntatore. See the code in testsuiteld-empic for details. - e entry Use entry as the explicit symbol for beginning execution of your program, rather than the default entry point. See section The Entry Point. for a discussion of defaults and other ways of specifying the entry point. - F - F format Ignored. Some older linkers used this option throughout a compilation toolchain for specifying object-file format for both input and output object files. The mechanisms ld uses for this purpose (the - b or - format options for input files, - oformat option or the TARGET command in linker scripts for output files, the GNUTARGET environment variable) are more flexible, but ld accepts the - F option for compatibility with scripts written to call the old linker. - format input-format Synonym for - b input-format . - g Ignored. Provided for compatibility with other tools. - G value - G value Set the maximum size of objects to be optimized using the GP register to size under MIPS ECOFF. Ignored for other object file formats. - help Print a summary of the command-line options on the standard output and exit. - i Perform an incremental link (same as option - r ). - l ar Add archive file archive to the list of files to link. This option may be used any number of times. ld will search its path-list for occurrences of lib ar. a for every archive specified. - L searchdir - L searchdir Add path searchdir to the list of paths that ld will search for archive libraries and ld control scripts. You may use this option any number of times. The directories are searched in the order in which they are specified on the command line. Directories specified on the command line are searched before the default directories. All - L options apply to all - l options, regardless of the order in which the options appear. The paths can also be specified in a link script with the SEARCHDIR command. Directories specified this way are searched at the point in which the linker script appears in the command line. - M Print (to the standard output) a link map--diagnostic information about where symbols are mapped by ld. and information on global common storage allocation. - Map mapfile Print to the file mapfile a link map--diagnostic information about where symbols are mapped by ld. and information on global common storage allocation. - m emulation - m emulation Emulate the emulation linker. You can list the available emulations with the --verbose or - V options. The default depends on how your ld was configured. - N Set the text and data sections to be readable and writable. Also, do not page-align the data segment. If the output format supports Unix style magic numbers, mark the output as OMAGIC. - n Set the text segment to be read only, and mark the output as NMAGIC if possible. - noinhibit-exec Retain the executable output file whenever it is still usable. Normally, the linker will not produce an output file if it encounters errors during the link process it exits without writing an output file when it issues any error whatsoever. - no-keep-memory ld normally optimizes for speed over memory usage by caching the symbol tables of input files in memory. This option tells ld to instead optimize for memory usage, by rereading the symbol tables as necessary. This may be required if ld runs out of memory space while linking a large executable. - o output Use output as the name for the program produced by ld if this option is not specified, the name a. out is used by default. The script command OUTPUT can also specify the output file name. - oformat output-format ld may be configured to support more than one kind of object file. If your ld is configured this way, you can use the - oformat option to specify the binary format for the output object file. Even when ld is configured to support alternative object formats, you dont usually need to specify this, as ld should be configured to produce as a default output format the most usual format on each machine. output-format is a text string, the name of a particular format supported by the BFD libraries. (You can list the available binary formats with objdump - i .) The script command OUTPUTFORMAT can also specify the output format, but this option overrides it. See section BFD. - R filename Read symbol names and their addresses from filename. but do not relocate it or include it in the output. This allows your output file to refer symbolically to absolute locations of memory defined in other programs. - relax An option with machine dependent effects. On some platforms, the - relax option performs global optimizations that become possible when the linker resolves addressing in the program, such as relaxing address modes and synthesizing new instructions in the output object file. - retain-symbols-file filename Retain only the symbols listed in the file filename. discarding all others. filename is simply a flat file, with one symbol name per line. This option is especially useful in environments where a large global symbol table is accumulated gradually, to conserve run-time memory. - retain-symbols-file does not discard undefined symbols, or symbols needed for relocations. You may only specify - retain-symbols-file once in the command line. It overrides - s and - S. - r Generate relocatable output--i. e. generate an output file that can in turn serve as input to ld. This is often called partial linking . As a side effect, in environments that support standard Unix magic numbers, this option also sets the output files magic number to OMAGIC. If this option is not specified, an absolute file is produced. When linking C programs, this option will not resolve references to constructors to do that, use - Ur. This option does the same thing as - i. - S Omit debugger symbol information (but not all symbols) from the output file. - s Omit all symbol information from the output file. - shared Create a shared library. This is currently only supported on ELF and SunOS platforms. On SunOS, the linker will automatically create a shared library if the - e option is not used and there are undefined symbols in the link. - sort-common Normally, when ld places the global common symbols in the appropriate output sections, it sorts them by size. First come all the one byte symbols, then all the two bytes, then all the four bytes, and then everything else. This is to prevent gaps between symbols due to alignment constraints. This option disables that sorting. - split-by-reloc count Trys to creates extra sections in the output file so that no single output section in the file contains more than count relocations. This is useful when generating huge relocatable for downloading into certain real time kernels with the COFF object file format since COFF cannot represent more than 65535 relocations in a single section. Note that this will fail to work with object file formats which do not support arbitrary sections. The linker will not split up individual input sections for redistribution, so if a single input section contains more than count relocations one output section will contain that many relocations. - split-by-file Similar to - split-by-reloc but creates a new output section for each input file. - stats Compute and display statistics about the operation of the linker, such as execution time and memory usage. - Tbss org - Tdata org - Ttext org Use org as the starting address for--respectively--the bss. data. or the text segment of the output file. org must be a single hexadecimal integer for compatibility with other linkers, you may omit the leading 0x usually associated with hexadecimal values. - T commandfile - T commandfile Read link commands from the file commandfile. These commands replace ld s default link script (rather than adding to it), so commandfile must specify everything necessary to describe the target format. See section Command Language. If commandfile does not exist, ld looks for it in the directories specified by any preceding - L options. Multiple - T options accumulate. - t Print the names of the input files as ld processes them. - traditional-format For some targets, the output of ld is different in some ways from the output of some existing linker. This switch requests ld to use the traditional format instead. For example, on SunOS, ld combines duplicate entries in the symbol string table. This can reduce the size of an output file with full debugging information by over 30 percent. Unfortunately, the SunOS dbx program can not read the resulting program ( gdb has no trouble). The - traditional-format switch tells ld to not combine duplicate entries. - u symbol Force symbol to be entered in the output file as an undefined symbol. Doing this may, for example, trigger linking of additional modules from standard libraries. - u may be repeated with different option arguments to enter additional undefined symbols. - Ur For anything other than C programs, this option is equivalent to - r. it generates relocatable output--i. e. an output file that can in turn serve as input to ld. When linking C programs, - Ur does resolve references to constructors, unlike - r. It does not work to use - Ur on files that were themselves linked with - Ur once the constructor table has been built, it cannot be added to. Use - Ur only for the last partial link, and - r for the others. --verbose Display the version number for ld and list the linker emulations supported. Display which input files can and cannot be opened. - v - V Display the version number for ld. The - V option also lists the supported emulations. - version Display the version number for ld and exit. - warn-common Warn when a common symbol is combined with another common symbol or with a symbol definition. Unix linkers allow this somewhat sloppy practice, but linkers on some other operating systems do not. This option allows you to find potential problems from combining global symbols. Unfortunately, some C libraries use this practice, so you may get some warnings about symbols in the libraries as well as in your programs. There are three kinds of global symbols, illustrated here by C examples: int i 1 A definition, which goes in the initialized data section of the output file. extern int i An undefined reference, which does not allocate space. There must be either a definition or a common symbol for the variable somewhere. int i A common symbol. If there are only (one or more) common symbols for a variable, it goes in the uninitialized data area of the output file. The linker merges multiple common symbols for the same variable into a single symbol. If they are of different sizes, it picks the largest size. The linker turns a common symbol into a declaration, if there is a definition of the same variable. The - warn-common option can produce five kinds of warnings. Each warning consists of a pair of lines: the first describes the symbol just encountered, and the second describes the previous symbol encountered with the same name. One or both of the two symbols will be a common symbol. Turning a common symbol into a reference, because there is already a definition for the symbol. Turning a common symbol into a reference, because a later definition for the symbol is encountered. This is the same as the previous case, except that the symbols are encountered in a different order. Merging a common symbol with a previous same-sized common symbol. Merging a common symbol with a previous larger common symbol. Merging a common symbol with a previous smaller common symbol. This is the same as the previous case, except that the symbols are encountered in a different order. - warn-constructors Warn if any global constructors are used. This is only useful for a few object file formats. For formats like COFF or ELF, the linker can not detect the use of global constructors. - warn-once Only warn once for each undefined symbol, rather than once per module which refers to it. For each archive mentioned on the command line, include every object file in the archive in the link, rather than searching the archive for the required object files. This is normally used to turn an archive file into a shared library, forcing every object to be included in the resulting shared library. - X Delete all temporary local symbols. For most targets, this is all local symbols whose names begin with L. - x Delete all local symbols. - y symbol Print the name of each linked file in which symbol appears. This option may be given any number of times. On many systems it is necessary to prepend an underscore. This option is useful when you have an undefined symbol in your link but dont know where the reference is coming from. -( archives -) --start-group archives --end-group The archives should be a list of archive files. They may be either explicit file names, or - l options. The specified archives are searched repeatedly until no new undefined references are created. Normally, an archive is searched only once in the order that it is specified on the command line. If a symbol in that archive is needed to resolve an undefined symbol referred to by an object in an archive that appears later on the command line, the linker would not be able to resolve that reference. By grouping the archives, they all be searched repeatedly until all possible references are resolved. Using this option has a significant performance cost. It is best to use it only when there are unavoidable circular references between two or more archives. Go to the first. previous. next. last section, table of contents.

No comments:

Post a Comment