Rela *r;
void *ve;
- massert((sec=get_section(".rela.plt",sec1,sece,sn)));
+ massert((sec=get_section(".rela.dyn",sec1,sece,sn)));
v+=sec->sh_offset;
ve=v+sec->sh_size;
*/
#define ALLOC_ALIGNED(f, size,align) \
- (align <= sizeof(plong) ? (char *)((f)(size)) : \
- (tmp_alloc = (char *)((f)(size+(size ?(align)-1 : 0)))+(align)-1 , \
- (char *)(align * (((unsigned long)tmp_alloc)/align))))
+ ({ufixnum _size=size,_align=align;_align <= sizeof(plong) ? (char *)((f)(_size)) : \
+ (tmp_alloc = (char *)((f)(_size+(_size ?(_align)-1 : 0)))+(_align)-1 , \
+ (char *)(_align * (((unsigned long)tmp_alloc)/_align)));})
#define AR_ALLOC(f,n,type) (type *) \
(ALLOC_ALIGNED(f,(n)*sizeof(type),sizeof(type)))
object ar=sSAprofile_arrayA->s.s_dbind;
void *x;
+ fixnum a,s;
if (type_of(ar)!=t_string)
FEerror("si:*Profile-array* not a string",0);
if( type_of(start_address)!=t_fixnum || type_of(scale)!=t_fixnum)
FEerror("Needs start address and scale as args",0);
- x=!(fix(start_address)*fix(scale)) ? NULL : (void *) (ar->ust.ust_self);
+ massert((a=fix(start_address))>=0);
+ massert((s=fix(scale))>=0);
+
+ x=a&&s ? (void *) (ar->ust.ust_self) : NULL;
profil(x, (ar->ust.ust_dim),fix(start_address),fix(scale) << 8);
RETURN1(start_address);
}