mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
outobj: allow for segments in the group FLAT to belong to the other group
It's possible that segments belong to both the group FLAT and the other group because the group FLAT is a pseudo group. Signed-off-by: KO Myung-Hun <komh78@gmail.com>
This commit is contained in:
parent
d45ad2e7ed
commit
3f37cacdd2
1 changed files with 12 additions and 2 deletions
|
|
@ -1518,7 +1518,12 @@ static int32_t obj_segment(char *name, int *bits)
|
|||
nasm_free(grp->segs[i].name);
|
||||
grp->segs[i] = grp->segs[grp->nindices];
|
||||
grp->segs[grp->nindices++].index = seg->obj_index;
|
||||
if (seg->grp)
|
||||
/*
|
||||
* The group FLAT is a pseudo group. Therefore, it is
|
||||
* allowed to redefine a segment in the group FLAT as
|
||||
* other group.
|
||||
*/
|
||||
if (seg->grp && strcmp(seg->grp->name, "FLAT"))
|
||||
nasm_warn(WARN_OTHER, "segment `%s' is already part of"
|
||||
" a group: first one takes precedence",
|
||||
seg->name);
|
||||
|
|
@ -1633,7 +1638,12 @@ obj_directive(enum directive directive, char *value)
|
|||
*/
|
||||
grp->segs[grp->nentries++] = grp->segs[grp->nindices];
|
||||
grp->segs[grp->nindices++].index = seg->obj_index;
|
||||
if (seg->grp)
|
||||
/*
|
||||
* The group FLAT is a pseudo group. Therefore, it is
|
||||
* allowed to redefine a segment in the group FLAT as
|
||||
* other group.
|
||||
*/
|
||||
if (seg->grp && strcmp(seg->grp->name, "FLAT"))
|
||||
nasm_warn(WARN_OTHER, "segment `%s' is already part of"
|
||||
" a group: first one takes precedence",
|
||||
seg->name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue