This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: relocation table: -Wl,--emit-relocs


Dear all,

I need to modify a program compiled for the SPARC using sparc-elf-GCC, for that I need the relocation table which I include in the executable file
 using the gcc option -Wl,--emit-relocs and then I recover using read(elf). The thing is that in this relocation table only appears the 
relocation information for the SETHI & CALL instructions but not the JMPL which I also need. 

Does anyone know how can I obtain the relocation information for the JMPL and other indirect jumps?

PD: The version of binutils I'm currently using is 2.19.1 and for gcc is
4.3.2

Best regards,


Le mercredi 26 aoÃt 2009 Ã 17:20 -0700, Ian Lance Taylor a Ãcrit :
> Jorge PEREZ <jorge.perez@invia.fr> writes:
> 
> > I need to modify a program after it compilation using gcc, for that I
> > need the relocation table which I obtain using the option
> > -Wl,--emit-relocs and then I output using read(elf). The thing is that
> > in this relocation table only appear the relocation information for the
> > SETHI & CALL instructions but not the JMPL which I also need. Does
> > anyone know how can I obtain the relocation information for the JMPL and
> > other indirect jumps?
> 
> You didn't mention which processor you are using, and I can't guess.  In
> general you will not get relocations for branches within a single object
> file.  In some cases gas will emit relocations if you pass it the -relax
> option.
> 
> This question doesn't actually have anything to do with gcc proper, and
> would be better directed to binutils@sourceware.org.
> 
> Ian






Ce message et toutes les piÃces jointes (ci-aprÃs le "message") sont
Ãtablis a l'intention exclusive de ses destinataires. Si vous recevez ce
message par erreur, merci de le dÃtruire et d'en avertir immÃdiatement
l'expÃditeur par e-mail. Toute utilisation de ce message non conforme a
sa destination, toute diffusion ou toute publication, totale ou
partielle, est interdite, sauf autorisation expresse. Les communications
sur Internet n'Ãtant pas sÃcurisÃes, lâexpÃditeur informe qu'il ne peut
accepter aucune responsabilità quant au contenu de ce message. 

This mail message and attachments (the "message") are solely intended
for the addressees. It is confidential in nature. If you receive this
message in error, please delete it and immediately notify the sender by
e-mail. Any use other than its intended purpose, dissemination or
disclosure, either whole or partial, is prohibited except if formal
approval is granted. As communication on the Internet is not secure, the
sender does not accept responsibility for the content of this message. 














Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]