This is the mail archive of the binutils@sourceware.cygnus.com 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]

Re: gas generating bad code for i386


   Date: Tue, 07 Mar 2000 14:39:39 -0500
   From: Tom Riddle <ftr@oracom.com>

   > Please do not send base64 messages to this mailing list.  Send plain
   > text.

   What I sent was plain text, not sure what you received.

This is what I received for the message to which I am replying.
Please check your mailer configuration.

SWFuIExhbmNlIFRheWxvciB3cm90ZToNCg0KPiAgICBEYXRlOiBUdWUsIDA3IE1hciAyMDAw
IDE0OjE3OjAxIC0wNTAwDQo+ICAgIEZyb206IFRvbSBSaWRkbGUgPGZ0ckBvcmFjb20uY29t
Pg0KPg0KPiBQbGVhc2UgZG8gbm90IHNlbmQgYmFzZTY0IG1lc3NhZ2VzIHRvIHRoaXMgbWFp
bGluZyBsaXN0LiAgU2VuZCBwbGFpbg0KPiB0ZXh0Lg0KDQpXaGF0IEkgc2VudCB3YXMgcGxh
aW4gdGV4dCwgbm90IHN1cmUgd2hhdCB5b3UgcmVjZWl2ZWQuDQoNCj4NCj4NCj4gSSdtIHN1
cnByaXNlZCB0aGF0IHRoZSBpbnN0cnVjdGlvbiBgamUgNCcgZXZlciBkaWQgd2hhdCB5b3Ug
d2FudCBpdCB0bw0KPiBkby4gIFRvIG1lIHRoYXQgaXMgYSBqdW1wIHRvIHRoZSBhYnNvbHV0
ZSBhZGRyZXNzIDQuDQo+DQo+IFVzZSBzb21ldGhpbmcgbGlrZSBgamUgLis0JyBpbnN0ZWFk
Lg0KDQpBY2NvcmRpbmcgdG8gdGhlIGdhcyBpbmZvIHBhZ2VzLCBOb2RlOiBpMzg2LU1lbW9y
eToNCg0KICAgQWJzb2x1dGUgKGFzIG9wcG9zZWQgdG8gUEMgcmVsYXRpdmUpIGNhbGwgYW5k
IGp1bXAgb3BlcmFuZHMgbXVzdCBiZQ0KcHJlZml4ZWQgd2l0aCBgKicuICBJZiBubyBgKicg
aXMgc3BlY2lmaWVkLCBgYXMnIGFsd2F5cyBjaG9vc2VzIFBDDQpyZWxhdGl2ZSBhZGRyZXNz
aW5nIGZvciBqdW1wL2NhbGwgbGFiZWxzLg0KDQoNCi0tDQoNClRvbSBSaWRkbGUNCg0KT3Jh
Y29tLCBJbmMuDQpodHRwOi8vd3d3Lm9yYWNvbS5jb20NCg0KVGVsLiArMSA5NzguNTU3LjU3
MTB4MzA1DQpGYXggICsxIDk3OC41NTcuNTcxNg0KDQoNCg==

   > I'm surprised that the instruction `je 4' ever did what you want it to
   > do.  To me that is a jump to the absolute address 4.
   >
   > Use something like `je .+4' instead.

   According to the gas info pages, Node: i386-Memory:

      Absolute (as opposed to PC relative) call and jump operands must be
   prefixed with `*'.  If no `*' is specified, `as' always chooses PC
   relative addressing for jump/call labels.

That has to do with the addressing mode, not the target of the jump.
I read `je 4' as a PC relative jump to the absolute address 4.  The
current version of gas generates that, using a PC relative relocation.

Ian

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